Javascript – React Hook "useRef" cannot be called inside a callback error
I'm trying to write Reactjs code for scroll to functionality. I want the referenced IDs of different sections be generated for the elements of the 'lables' array. import { useRef } from 'react'; const useDivRefs = (labels) => { const…