can use react useRef hook in .map() function to access all elements ?
maybe when you map, return a component. And in the component do the useRef so each return element has a ref
you can't use hooks in a loop, what are you trying to achieve exactly?
I'm trying to create a video player dapp the video list as an arry i want to map array of videos then use useRef hook to access each video and reate a player function
so wht i'm looking for is to create custom play button
why do you need to use useRef?
I agree you probably dont need a ref but can't you do this?
is there other way ?
Обсуждают сегодня