skip to Main Content

Reactjs – Invalid hook call of useRef()

I'm trying to assing refs dinamically, but I get the error "Invalid hook call. Hooks can only be called inside of the body of a function component" when useRef. Here: const [subsistemaPlanetario, setSubsistemaPlanetario] = useState([]); const planetRefs = useRef({}); useEffect(()…

VIEW QUESTION
Back To Top
Search