I'm following this tutorial
https://javascript.plainenglish.io/5-advanced-react-patterns-a6b7624267a6
Can you explain me what's the purpose of this code, please?
const firstMounded = useRef(true);
useEffect(() => {
if (!firstMounded.current) {
onChange && onChange(count);
}
firstMounded.current = false;
}, [count, onChange]);