Skip to main content

All Questions

0 votes
1 answer
61 views

Not able to get inside the for loop in React js

I am making a To-Do App. I am using React frontend, Node backend, and Postgresql DB. I made a component called <TaskLists /> which takes three properties or props: startDate endDate allTasks ...
Aakarshit's user avatar
0 votes
1 answer
33 views

Cannot update state from child element in React (functional components)

I want to have a child component reference and update a state; however, when I try to do so, it only works once or twice before breaking. Strangely, the parent element can still update the state. ...
Kyle Tennison's user avatar
-4 votes
0 answers
20 views

Invariant failed: A state mutation was detected between dispatches [closed]

This is the body of the code const tableHeader = [ { title: "Product name", widthClass: "w-[25%]" }, { title: "Product category", widthClass: "w-[19%...
Iroh Nkechi Omolola's user avatar
0 votes
0 answers
28 views

How to make a tooltip for a column in a table if the text in the column is larger than 250 pixels

I am using tailwind and shadcn for development. My idea is that if the text in a column is larger than a certain number of pixels, it should be possible to see a tooltip from the shadcn library for ...
Артем Лебідь's user avatar
0 votes
1 answer
59 views

Change in locale is not affecting the application

I am creating an application with dayjs as the date-time library. In the application I am setting the default locale to "en" at the app level and when I am changing the language in the ...
lrr59's user avatar
  • 171
0 votes
2 answers
39 views

Working of useSearchDebounce custom react hook

I found this code from this answer https://stackoverflow.com/a/68780417/26420821 How does it work? export function useSearchDebounce(delay = 350) { const [search, setSearch] = useState(null); ...
Baxu's user avatar
  • 1
0 votes
1 answer
21 views

useState returning empty array on default state, using react + supabase

I need help to understand why when I console.log(menus) on Menu.jsx it returns an array of values, but if I console.log(item) it only returns an empty array, while the default value of the item is &...
eko pram's user avatar
0 votes
1 answer
62 views

onClick method not working in my React Project [closed]

I am creating a react eCommerce project everything is done but I'm having troubles in login page I created an account in firebase and configured it to allow user to login via their google account. For ...
The Unique 1's user avatar
0 votes
1 answer
22 views

Keep scroll bar Y position after re-render in react

I tried all other similar questions here but there were about 3 years ago questions and answers which's not working right now. So I have a child component which contains table and in the parent ...
Artem Horbachov's user avatar
0 votes
1 answer
33 views

Unable to pass prop to api function from UseEffect in React Next.js

Just for full context, I am using App Router in next.js. I am having trouble passing 'serial_num' as an argument to my api function "fetchImages" when I am trying to trigger it from inside ...
serdar_bay's user avatar
0 votes
2 answers
41 views

ReactJS - Resetting a timeout in progress and reactivating from the same button press

I have a button that has a callback function. I want the button to start a timeout with a 5 second delay when clicked. If the button is clicked again within that 5 seconds, I want the timeout to ...
user279043's user avatar
0 votes
1 answer
19 views

Why doesn't webstorm/react-hook-forms tell me possible options for name?

I want to make components with inputs, but at the moment I have a problem that with the current implementation I don’t have tooltips for name, but I would like form fields to be displayed in name. ...
i chestor's user avatar
-3 votes
0 answers
34 views

I need help about how should use mutation fn in the react project [closed]

I am new in coding and try to learn react. I try to usemutation hook for my component and in this I need a mutation fn, where I face this Error: No overload matches this call. The last overload gave ...
Razieh's user avatar
  • 1
-2 votes
0 answers
48 views

How to update react state immediately? [closed]

I have 2 dialog boxes in my website for processing payment. When the user clicks on the "Location button", the first dialog for entering information payment is rendered and the state equals ...
fathi93's user avatar
  • 343
-1 votes
0 answers
19 views

NextJS - useEffect refreshes and re-renders again to default [duplicate]

I am trying to build a dashboard and using the Shadcn and nextjs example. Here is my code for the app/dashboard/positions/page.tsx 'use client'; import... const breadcrumbItems = [ { title: '...
Vivian Lobo's user avatar

15 30 50 per page
1
2 3 4 5
1013