Q. What does the useEffect hook return?

  • (A) Nothing
  • (B) A function for rendering
  • (C) A cleanup function
  • (D) A state value
πŸ’¬ Discuss
βœ… Correct Answer: (C) A cleanup function
Explanation: useEffect can return a cleanup function that runs when the component unmounts or before the effect re-runs.
Explanation by: Mr. Dubey
useEffect can return a cleanup function that runs when the component unmounts or before the effect re-runs.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
90
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate