Category "reactjs"

Problem in putting a download button to download a pdf file in a React Website

I'm creating a portfolio website using react and I want to add the feature of adding a download button in it so that anyone could download my resume through the

GraphQL - retrieves only maximum 10 items from Strapi

I am using React with Strapi and GrapqQL in order to retreive my data from Strapi. Seems that my query retrieves only maximum 10 items. The API is changed with

How to get all selected values of Tag Picker in Fluent UI

In the docs, some of the props do not exist on the component, so I guess it's outdated. I have a TagPicker component, I'm using the Tag Picker with inline sugge

React Click Counter: Updating State of just one element

This should be pretty simple, but I can't figure out how to do it. I have a component with multiple buttons, each with a "count" value, set with state. When a

Role based react-router

What is the best way to conditionally render routes in react-router based on user role. I have a case where not all roles have permission to view certain routes

Uncaught Error: Invalid hook call. ReactJs

I am relatively new to react and I am trying to render a leaflet map on my site but I am currently getting an Invalid Hook call error. Any information would be

Module not found: Error: Can't resolve '@mui/icons-material/SearchOutlined'

I have installed both the packages already the icon and the core but still m getting this error, why?? import React from 'react' import './Nav.css'; import

I want to add web3 package to react project - BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default

I add web3 package to my react project and start. yarn add web3 yarn start But it causes following errors: ... BREAKING CHANGE: webpack < 5 used to includ

React Native Metro bundler resolver issue with json (None of these files exist)

I have monorepo with React code and React Native code. react - common - - file.json ... react-native - App.js In App.js I tried to import json file from react/

Is it possible to set top border on ChartJS Doughnut Gauge chart

Target Doughnut gauge with green top border: Example Doughnut gauge: https://codesandbox.io/s/jlonjk9zv5 The question: Is it possible to implement abovemention

React-router stops working when error boundary catches an error in route

The codepen linked to below, uses react-router and an error boundary to catch errors within each route. If you click on "Shop", the error is caught as expected

Array.prototype.map() expects a return value from arrow function array-callback-return

Don't really know why it is saying this but this is the code I believe it is talking about setUpdate(text, key) { const items = this.state.items; items.map(

React - react-final-form validation

I have a question regarding react-final form error message when using record-level validation. I have the following field present within FormFilterFields compon

How to check if user has a specific token by querying NFTBalances?

I am trying to check if a user has a specific token, in my case token_id should be "87". How can I check that using NFTBalances? I wrote the code below but it i

Vite Server is running but not working on localhost

Vite + Reactjs server is running but I am getting "This localhost page can’t be found No webpage was found for the web address: https://localhost:4200/" o

How to create React App including Web3 using create-react-app? I am getting Module not found Error. BREAKING CHANGE: webpack < 5 used

I am new to Web3 and I am trying to create a react app integrated with web3. Below are the steps I followed in Ubuntu. create-react-app app_name cd app_

I am facing an error net::ERR_ABORTED 401 (Unauthorized)

In my componentDidMount function I have a problem. I'm facing error 401 in my Reactjs site, my username and password are correct. componentDidMount() { co

react-select and typescript: Type 'string' is not assignable to type 'ValueType<OptionTypeBase>'

I am trying to create an example component that uses react-select with typescript. For this, I created a functional component and added the default example fro

Protected Route by checking JWT saved in user's cookie

I just finished implementing Google social authentication in my NextJS + DjangoRest project following this blog post. I am trying to figure out how to make prot

Paste test in cypress in reactjs project

Any ideas how to simulate Paste action in Cypress in a bundle with React? My test should check value right after paste action. I found few solutions based o