Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
| const useMounted = () => { | |
| const isMounted = useRef(false); | |
| useEffect(() => { | |
| isMounted.current = true; | |
| return () => { | |
| isMounted.current = false; | |
| }; | |
| }, []); |