Given the following component, when I press down on the age selector and change the value to 15, such that I render a form without the driver license field, I get the error:
Make sure that you didn't run useEffect conditionally.
useEffect
For example, if you have some code like the following:
if(condition) { useEffect(()=>{ doSomething(); }, []); }
Then change it to
useEffect(()=>{ if(condition) { doSomething(); } }, []);
Then the error would not happen.