use-effect-once
useEffectOnce and useLayoutEffectOnce with conditional execution
useEffectOnce and useLayoutEffectOnce with conditional execution
`useEffectOnce` is a wrapper for `useEffect` that performs the effect only once, unlike other options it uses `useContext` and does not use `useRef`.