Q. What is the second argument of useEffect used for?

  • (A) To provide initial value
  • (B) To define dependencies
  • (C) To define return type
  • (D) To prevent rendering
πŸ’¬ Discuss
βœ… Correct Answer: (B) To define dependencies
Explanation: The second argument is an array of dependencies; the effect re-runs when any dependency changes.
Explanation by: Mr. Dubey
The second argument is an array of dependencies; the effect re-runs when any dependency changes.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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