0 votes
in ReactJS by
What are the methods invoked during error handling ReactJs, Explain with example?

1 Answer

0 votes
by

Below methods are called when there is an error during rendering, in a lifecycle method, or in the constructor of any child component.

  1. static getDerivedStateFromError()
  2. componentDidCatch()
...