...

/

Method 2: componentDidCatch

Method 2: componentDidCatch

Let’s understand the purpose of the componentDidCatch method.

We'll cover the following...

The componentDidCatch method is called after an error in a descendant component is thrown. Apart from the error thrown, it is passed one more argument which represents more information about the error:

Access this course and 1400+ top-rated courses and projects.