How to keep track of the object reference in a useEffect?
Advertisements I’m building some API hooks and I have trouble with deps property. I want to reinvoke the useEffect when content of deps changes, instead I’m running in a forever loop. deps can be either undefined or an any[] export const useReader = <TResponseData>({ url, deps, options }: TypeUseReader<TResponseData>) => { const [data, setData] =… Read More How to keep track of the object reference in a useEffect?