Direction: Choose the correct option
Q1.
How do you perform cleanup in useEffect?
Direction: Choose the correct option
Q2.
When is the cleanup function called?
Direction: Choose the correct option
Q3.
Which scenario typically requires cleanup?
Direction: Choose the correct option
Q4.
What will the following code do? useEffect(() => { const timer = setInterval(() => {}, 1000); return () => clearInterval(timer); }, []);
Direction: Choose the correct option
Q5.
If an effect has no cleanup function, what happens?
