Category "reactjs"

How to convert Devextreme React sample code to uses React 18?

DevExtreme React sample application uses ReactDOM.render that was deprecated on React 18. I converted the code to use ReactDOM.createRoot but the webpage is not

entered value only shows in console reactjs

I'm making an expense handler app using reactjs in a practical course. Now, I'm supposed to make a new row with the data I'm passing through form. But it only s

React-router-dom v6 params

How do I create a route in react using react-router-dom v6? Currently I'm trying: <Route path="/registration:id" element={<Registration />} /> With

React-router showing invalid hook call

An invalid hook error occurred in my react app caused by react-router but I can't seem to detect where it's coming from. The full error reads as follows: Error:

Getting "...'editorState' does not exist on type 'IntrincsicAttributes

I'm working on a post section on my webapp and I decided to use react-draft-wysiwyg. Everything was working fine up to the point where I set editorState={editor

Target map()'ed items one by one

I want to create a contact form where the form fields are changed after they are filled. For example when you fill the email field, you press enter or click the

npx create-react-app show error when installing

npx create-react-app shoing eror whent installing, please help me how to solve this problem. my nodejs version is v16.14.2 and npm version is 8.5.0 Installing p

How to send a image jpg/png file from react to express server

I am trying to send an object from react to express server using node.js this is my object: const formData = { location: location, cost: cost, email

Use both enzyme and react-testing-library

So, we started implementing testing in our app, I used enzyme and my coworkers used react-testing-library. Of course the setupTests.js file is different so eith

How can i add React loading spinner when item is fetching from database?

Here is, my code. i want to add a spinner when data is loading then after finish loading display the data. {/* product section */} <section className="c

React Redux Problem: How to call multiple api in your react component with React Redux Toolkit RTK queries?

Hope you all are doing fine. RTK queries return response in data attribute which can be accessed via hook generated by RTK My Code: const {data = [], isFetching

React native expo web page refresh from chrome browser

ima having a react native web app and when i refresh the page from browser, it navigates to my apps homepage. is there any way that could fix that issue. it ha

React native expo web page refresh from chrome browser

ima having a react native web app and when i refresh the page from browser, it navigates to my apps homepage. is there any way that could fix that issue. it ha

How to avoid act() with sub component changes?

I'm using the Select component from patternfly and attempting to do a test that involves making changes to the selection. I feel like I'm in a catch 22 as I can

if I have an array I want to open accordion Mui by map

enter image description here enter link description here This code is from MUI and look there please when you open the first accordion then you open the second

How to connect Material UI v5 to Next JS v12?

Recently, Material UI 5 was released. Previously (in Material UI 4), I used to connect it by modifying _document.js and _app.js. Is it the same for Material UI

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

How can I render only once an Alert component in react native?

How can I render only one time an Alert component in react native if my dashboardScreen is being render many times? I'm using Context api, if I dispatch an acti

React native - undefined is not an object (evaluating '_bip.default.generateMnemonic')

I'm building a mobile application and I need to generate a passphrase using bip39. At first, when I installed the package from npm I got missing dependencies er

Redux state change not reflected when connecting multiple React modules to same store

I am working on a React application (not CRA template) which consists multiple modules and I am trying to connect some of the modules to same Redux store so tha