Question: How do you invoke setDone only when component mounts, using hooks?
- `useEffect(() => { setDone(true); });`
- `useEffect(() => { setDone(true); }, []);`
- `useEffect(() => { setDone(true); }, [setDone]);`
- `useEffect(() => { setDone(true); }, [done, setDone]);`
Answer: The correct answer of the above question is Option B:`useEffect(() => { setDone(true); }, []);`