3 ms·
You can use a boolean ref for this in the useEffect to keep track whether it was the first render or not. https://reactjs.org/docs/hooks-faq.html#can-i-run-an-e
by ricardobayes 5y ago
You can use a boolean ref for this in the useEffect to keep track whether it was the first render or not.
https://reactjs.org/docs/hooks-faq.html#can-i-run-an-effect-only-on-updates https://reactjs.org/docs/hooks-faq.html#can-i-run-an-effect-...