Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
With componentDidCatch()
comes a new concept of an error boundary. Error boundaries are wrapper components that use componentDidCatch()
to capture errors anywhere in their child component tree and display a fallback UI.
Resources
componentDidCatch()
β React docs- Better error handling β React docs
- Error Handling in React 16
- Introducing Error Boundaries
Note: Error boundaries only catch errors in the components below them in the tree. An error boundary canβt catch an error within itself.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up