Category "reactjs"

My timer in Reactjs is not working correctly with a delay

My timer in Reactjs is not working correctly with a delay... I noticed that over time, my timer starts to lag if I switch to another browser tab or window. Why

I do not understand the difference between redux and react-hook-form. What is the difference?

I do not understand the difference between redux and react-hook-form. What is the difference? (I am only somewhat aware of the fact that both are tools to manag

Testing React Component with React Router V6

I understand that React Testing Library has an example of testing with react router, but I couldn't get it to work (I think because I am using react router V6).

Redirect 404 to homepage in Nextjs with dynamic routes

I am trying to redirect 404 pages to the homepage in Nextjs, but because of a rule in the next.config.js it does not work. Every other 404 redirects to homepage

React difference of using value in state vs value in object in state

I am getting different behaviour depending on whether I am using a boolvalue on with useState, or whether I am using a bool value inside an object with useState

nextjs and bootstrap5 modal

Hello I would like to use bootstrap 5 without react-bootstrap and reactstrap when I create my modal I end up with this error: TypeError: undefined is not an obj

Update custom hook's variable after initial call

I created a custom fetch hook called useFetch() and initialled it in my App.js component, to render a list of movies when the web app loads up the page. I am tr

How to add custom indicator in trading view Charting library in reactjs

I have trading view charting library i'm working on it but now i want to add custom indicator in it but i don't know how to do.

Assigning ScrollTo value cause unexpected flickering/blinking on iOS devices

We recently worked on an auto-scrolling while freely swipeable component using React.js. The implementation idea is inspired by this article And we've made some

How to properly change a array of object to another array of object in TypeScript [closed]

How to properly change a array of object to another array of object in TypeScript? a : [ {bcdbcd : 1, abcabc : "value1"}, {bcdbcd : 2, abc

invalid url for nextjs image

I am writing the frontend of my application with nextjs I am trying to load image from the public folder but I am getting invalid url I copied the image to the

React project Error: Map container not found

I have a ts project written with React, I want to render a simple map an a rightsider but I got an error report "Error: Map container not found."Below is my met

Is there a way to accept image as props in react component?

I am following react tutorial teaching by Bob Zirol in freecodecamp; in my App.js I have rendered a Card.js component which I passed an image as props; so how c

How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?

I have a fun project made with create react app. I want to convert the same application to a browser extension. This idea forces me to make the project a mono r

React - Enzyme mount throwing regeneratorRuntime is not defined error

I am trying to test the following component: class SearchComp extends Component { constructor(props){ super(props);

react-router-dom v6 StaticRouter context is not working

I'm trying to make SSR React web application. Everything works fine except staticContext. My server code is // IMPORTS const renderer = (req, store, context) =

react-router-dom v6 for google analytics

So in a previous application for using Google Analytics i had this component for a <RouteChangeTracker/> this component would listen to the url change, an

Installing dependency produces: ERESOLVE unable to resolve dependency tree

When I try to install a dependency I get the following error. How can I fix this? npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm

plane detection with react-three/xr

I`m using react-three/xr and react-three/drei in my next.js project. This code put the 3d model i an static position. const Test: NextPage = () => { return (

How to dynamically draw edges between nodes using jsplumbtoolkit-react

I'm using jsplumbtoolkit-react 2.x version. Using toolkit.addNode to add new nodes dynamically to the graph. But I'm struggling to draw the connection between t