Error boundaries were introduced in React 16 as a way to catch and handle JavaScript errors that occur in the UI parts of our component.
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.
But you need to know that they do not handle errors in:
Event handlers
Asynchronous code
Server-side rendering
Errors thrown in the error boundary itself
************************************************************
Previous Video: • React Fragments (Explained) #13 React...
Next video: • React Portals #15 React Course
Full series • Full React Course
************************************************************
0:00 Intro
0:40 Unhandled UI error
1:20 Building Error Boundary component
3:31 Outro
🧿 I discussed:
✔️How to create an Error Boundary component
✔️How to catch UI errors in React
************************************************************
👉 Linkedin:
✔️ / slobodan-gajic
👉 Instagram:
✔️ / codewithsloba