Category "reactjs"

Javascript objects equality vs using the spread operator to create new objects [duplicate]

When I have an object defined as such, const obj = { first: "hey", second: "hello" } and I do not wish to modify this but create a ne

Unit testing useRouter's isReady

I have a component, which takes a parameter from the url and displays it. I implemented it using useRouter's isReady property. Something like this: import { use

How to solve map loop not working to print data ( component ) ? React

I have three componente ComponentFather ( grand Parent component ) ComponentChild ( Child component of ComponentFather) ComponentChildChild ( Child component of

spread operator vs immutable.js

It seems like when using redux with react, immutable.js has become almost a industry standard. My question is, aren't we making changes to our redux states immu

Smooth Page transition with zoom in animation in React js

On my product store spa web app I want smooth zoom in page transition. Like when the product card or the detail button is clicked , it will take the user to the

Cannot get React testing Jest-DOM to select a date from a date picker or time from a time picker

I cannot, for the life of me, figure out how to get Jest-dom in react testing to select a date picker and the same for the time picker. All my other fields are

How to export all the pages to CSV in MUI DataGrid?

I hava a DataGrid table from Material UI with more than 3000 rows, each page contains max 50 rows per page. What I want is to be able to export all the rows to

React Material UI Autocomplete, prevent OnInputChange, after selecting value from dropdown

How do I prevent React Material UI to not trigger onInputChange, when a person selects a option from the dropdown? After using the dropdown, it retriggers the A

trying to create a new react project by (create-react-app) it is not working properly

I installed latest version of node.js, react.js and next.js Everything worked properly but at the point I try to create my react project folder in the terminal

How do I clone a AWS instance?

I had a developer create a react app and he hosted it on AWS. He never sent us the code and stopped responding. I'm trying to edit a few things on the app but I

Can't perform a React state update on an unmounted component. memory leak in my function

this is the image Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, can

Django REST Framework Render a result from an hyperlink in API response

I am building an application with a DRF/React stack, and I have a bit of an issue. I am using a HyperlinkedModelSerializer to be able to easily make a GET reque

is there any difference between this commands to install webpack? "npm install webpack webpack-cli --save-dev" & "npm install -D webpack webpack-cli "

Hello everyone I´m learning about webpack and i saw this two ways to install it, I was wondering if there is any difference between this two ways: this on

How do I validate user in reCAPTCHA v3 in react.js?

I am using the library "react-google-recaptcha-v3" for reCAPTCHA in React. I have a SignUp component, which essentially is something along the lines of a form w

Sphere not rolling straight

First time poster, long time (copy/)paster. I am making a pool/billiards game using React-Three/Cannon for physics, which is pretty much Cannon ES but with a la

How can I fetch data from a graphql structure which is in github?

I have a link to this repository ( https://github.com/scandiweb/junior-react-endpoint ). My question is, how can I clone this graphql structure to my react proj

Can't access state object in child component with React/TypeScript

I'm a beginner at TypeScript and I'm trying to access my state object (from App.tsx) within Questions.tsx. So I want/need to access for example chosenAmount in

When i fetch Heroku deployed a link, there is an error 500 (Internal Server Error)

If i used http://localhost:5000/login everything is working. When i used live link https://auto-shoroom.herokuapp.com/login there's the error POST https://auto-

Uncaught (in promise) Error: Invalid hook call. - SPECIAL CASE

I know that hooks cannot be called from functions other than React Functional Components, this is a bit different. I have created some utility/service type func

Tailwind CSS classes not updating after initial build of react app

I decided to bite the bullet today and upgrade from tailwind v2 to v3 for my react app. The upgrade went well, but I now have a problem where after I run "npm s