Handling Errors

Let's learn how to handle errors when something goes off.

We'll cover the following

In the real world, things often break, right?

It’s possible that in the process of fetching the lazy-loaded resource, a network error occurs.

Error Boundary

To handle such a case, be sure to wrap your lazy-loaded components in an error boundary.

Remember error boundaries from the Lifecycle methods chapter?

Here’s an example:

Get hands-on with 1400+ tech skills courses.