What method is used to define an error boundary in React?
componentDidCatch()
useEffect()
componentWillUnmount()
useState()
This question is part of this quiz :