UNUday Narayan Vishwakarmainunv.hashnode.dev·Sep 24, 2022 · 2 min readuseEffect HookWhat is useEffect? useEffect is a React hook which is used to handle side effects which occur in a component due to state change. It's basic syntax is useEffect(callback, [...dependencies]). Dependecy array By default useEffect runs every time th...01I
UNUday Narayan Vishwakarmainunv.hashnode.dev·Sep 24, 2022 · 3 min readBug found in the wilderness of Development environmentThis is a story of a beginner react dev mistake done while handling useEffect and async function. Context behind the bug In React js when we interact with any component and change a state, it triggers a re - render, but to handle any side effects , w...00
UNUday Narayan Vishwakarmainunv.hashnode.dev·Sep 24, 2022 · 3 min readuseRef HookWhat is Use Ref hook? It is a react hook which persists state between re-renders, similar to useState(), but when we update the useRef variable it doesn't cause re - render, whereas when we set the useState variable it causes re - render. Let's under...02ST