A

Admin • 802.91K Points
Coach

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
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin
componentDidMount runs after the first render.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.