Skip to main content

All Questions

Tagged with or
-6 votes
0 answers
110 views

I have a particular situation where I need a component (ViewOne) to update a ref, and read from that ref on mount. I also have a second component (ViewTwo) that needs to render different content ...
chrisroode's user avatar
2 votes
1 answer
67 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
  • 57
Best practices
0 votes
3 replies
72 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
-3 votes
0 answers
36 views

const onChangeFn = (e,i) => { const data = e.target.value; if(/^\d?$/.test(data)){ let new_Array = [...values] new_Array[i] = data; setValues(...
nikhil singh's user avatar
Best practices
0 votes
2 replies
143 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
0 votes
0 answers
126 views

In this example from react docs, I can remove use hook from const messageContent = use(messagePromise); leaving it like this const messageContent = messagePromise; and it still works (no error is ...
tautvls's user avatar
  • 27
-2 votes
0 answers
18 views

I am attempting to retrieve a search result from a MySQL database with Axios. res.data is populated with the correct data but when I use my useState setter inside the useEffect, my searchRes variable ...
Ethan Zogg's user avatar
3 votes
1 answer
92 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
94 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
140 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
94 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
125 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
402 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
103 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
96 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
2584