A

Admin • 828.03K Points
Coach

Q. Which method can be used to handle errors in React class components?

  • (A) componentDidCatch
  • (B) componentWillCatch
  • (C) componentDidUpdate
  • (D) componentError
  • Correct Answer - Option(A)
  • Views: 10
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin
componentDidCatch is a lifecycle method used to catch errors in class components.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.