## `useDepEffect` (use dependency effect) Runs a `useEffect` only when the dependency array changes and not on initial mount. (see related [stackoverflow discussion](https://stackoverflow.com/q/53179075/104380)) Instead of manually using a `ref` to know when the component mounted: ```js const isMountedRef = useRef(); useEffect(() => { if (isMountedRef.current) document.title = `You clicked ${count} times`; isMountedRef = true; }, [count]); ``` Use the custom hook (much shorter): ```js useDepEffect(() => { document.title = `You clicked ${count} times`; }, [count]); // Only re-run the effect if count changes ```
Activity
[-]React custom hook - useDepEffect[/-][+]Feature: React custom hook - useDepEffect[/+]fix: resolve multiple issues (open-amdocs#77, open-amdocs#89, open-am…