Q. What is the significance of the dependency array in useEffect?

  • (A) It determines when the effect should re-run
  • (B) It stores state values
  • (C) It defines event listeners
  • (D) It holds refs
πŸ’¬ Discuss
βœ… Correct Answer: (A) It determines when the effect should re-run
Explanation: Effect runs again only if dependencies change.
Explanation by: Mr. Dubey
Effect runs again only if dependencies change.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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