Skip to main content
1 vote
1 answer
136 views

I get the warning "Calling setState synchronously within an effect can trigger cascading renders" for my useEffect: useEffect(() => { if (positionData.length > 0) { const ...
macbas's user avatar
  • 41
0 votes
1 answer
70 views

I am learning React and was setting up a component that makes usage of useEffect and there is one case that I don't understand so I set up this minimum reproducible example: App.js: import { useState }...
Mohamed Badis Kerdellou's user avatar
0 votes
0 answers
69 views

I have a signature canvas on a form. When the form loads an existing report, it may already have signature data to load. In that case, in a useEffect, I call fromData on the signature component to ...
lmat - Reinstate Monica's user avatar
0 votes
1 answer
153 views

I have a page that on load, executes the following effect to retrieve data from a server const nav = useNavigation(); const loc = useLocation(); const [card, setCard] = useReducer(statefn, ...
GPorubanTKK's user avatar
2 votes
1 answer
114 views

i’m building a small AI chat ui in react (next.js app router, react 18) that streams tokens from my backend (openai style stream). basic flow: user types a prompt i push the user message into ...
Eli's user avatar
  • 79
Best practices
0 votes
2 replies
85 views

I am planning to implement pagination into my project for my data from Supabase, I had the idea that since there are different parameters (such as search text, page number, filter) that I should use ...
1million_ naira's user avatar
Best practices
0 votes
3 replies
255 views

I have been exploring the useTransition() hook and the startTransition() method provided by React with version 18+. The documentation states that we can de-prioritize state updates using them so that ...
midhun lc's user avatar
3 votes
1 answer
93 views

I have a modal. This modal opens after a user uploads a CSV. They can then make changes to the entries or delete them. The user can Confirm & Continue (go to next page, modal closes) or Upload New ...
npfist's user avatar
  • 125
3 votes
1 answer
124 views

I'm building a collaborative task management app using React 19's useOptimistic hook. Multiple users can update task properties (status, priority, assignee) simultaneously. I'm running into race ...
Gnaneshwar P's user avatar
0 votes
2 answers
156 views

app/page.tsx "use client"; import { useEffect, useRef } from "react"; import { foo } from "./OrdersModuleFoo"; import React from "react"; const OrdersModule: ...
TSR's user avatar
  • 21.5k
2 votes
1 answer
108 views

This is my structure about code: src App.js pages ConfigurationPage.jsx provider ConfigurationProvider.jsx context ConfigContext.jsx Explain bug: The code is executed 2 times in provider. The ...
ArthurArmand's user avatar
0 votes
1 answer
126 views

I'm using a DynamicForm component with a ref in a React functional component. I want to update the form once my Firebase collection is loaded. Here’s the relevant part of my component: const ...
Emi Buliga's user avatar
-1 votes
1 answer
517 views

When I read the react document, I found a new feature useEffectEvent, which raised a question. If I use responsive variables A and B in useEffect, but I am very sure that it is meaningful to make the ...
zhunbe's user avatar
  • 17
2 votes
1 answer
105 views

Im developing a new app and tried to implement authentication with JWT myself (and with ChatGPT). I will try to explain it as briefly as possible and what I think is happening. // Render the app const ...
ruben450's user avatar
  • 162
0 votes
1 answer
104 views

Can't perform a state update on an unmounted component. I understand that this warning happens when the component unmounts before the asynchronous request finishes, and then setState (or in my case ...
Vishal Mote's user avatar

15 30 50 per page
1
2 3 4 5
2583