Q. Which lifecycle method is called when a component is first added to the DOM in class components?

  • (A) componentDidMount
  • (B) componentWillUnmount
  • (C) shouldComponentUpdate
  • (D) render
πŸ’¬ Discuss
βœ… Correct Answer: (A) componentDidMount
Explanation: componentDidMount runs after the first render.
Explanation by: Mr. Dubey
componentDidMount runs after the first render.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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