Skip to main content
0 votes
0 answers
41 views

I have an unordered list wherein each list item is a card which contains a button. The button opens a popover with 2 options - edit/delete. When I tab through to the button and click on delete, a new ...
sharmaaa's user avatar
3 votes
2 answers
256 views

Ref interface: // create const count = useRef(0); // update (does not trigger render) count.current = 5; // access console.log(count.current); State variable interface: //create const [count, ...
Always a Newb at Something's user avatar
0 votes
1 answer
138 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
0 votes
2 answers
112 views

I have a webpage where users have a list of images they've uploaded. They have three buttons: Upload Image/Download Image/Delete Image. When the user clicks Delete, the Upload button will hide and ...
npfist's user avatar
  • 167
1 vote
1 answer
38 views

I want to upload a file by clicking the image element. I have an Input element of file type with a useRef. I'm referencing the useRef in the img Onclick but it's not opening the file selector. I ...
D.Hodges's user avatar
  • 2,129
1 vote
2 answers
61 views

I have a parent component which uses N children components, where N depends on the props in input. For example: function Parent({ cards }: { cards: Cards[] }) { return ( <> {cards....
Ant's user avatar
  • 5,514
4 votes
2 answers
186 views

I've been using React 19, and with the changes to how ref is handled, I noticed I need to adjust my code for components that inherit standard HTML element attributes. Previously, I used forwardRef ...
Raphael Elias's user avatar
5 votes
2 answers
5k views

I'm using primereact with nextjs but i get error Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.. so i guess ...
Morgana Freeman's user avatar
0 votes
1 answer
39 views

I can't figure out how to prevent the playerRef from reloading when clipLink change. When i work on dev mode(npm run dev), i can switch videos without reloading playerRef. However, when i work on ...
pheonisx's user avatar
-2 votes
2 answers
261 views

I've been working with React, and I'm trying to understand the difference between creating a reference using useRef and creating a reference without it. I've implemented two versions of a simple ...
Kunal Thakur's user avatar
-1 votes
1 answer
86 views

I have the following forwarded ref in React: export type AccordionHeaderProps<T extends ElementType> = { children: React.ReactNode; asTrigger?: boolean; subTitle?: React.ReactNode; ...
Ethan's user avatar
  • 1,918
0 votes
3 answers
108 views

I know this has been asked many times and the answer is always that the effect does not run when refs are mutated but that is not the issue because I run the effect every second until I have an html ...
HMR's user avatar
  • 39.6k
0 votes
1 answer
394 views

Navbar component code import Humburger from "./ui/Humburger"; const navlins = ["HOME", "PAGES", "PRODUCTS", "ARTICLES", "CONTACT"]; const ...
alex's user avatar
  • 33
3 votes
2 answers
686 views

Here in my React the clean up function is not executed when re-rendering: import React, { useRef, useState } from 'react'; export default function App() { const [x, setX] = useState(2); const d = ...
samh's user avatar
  • 49
0 votes
2 answers
121 views

I have a component that should expand if it is selected. Here's my current approach: <Element ref={elementRef} style={{ height: isSelected ? `${elementRef.current.scrollHeight}px` : '0px' }} ...
Bing Bang's user avatar

15 30 50 per page
1
2 3 4 5
20