From the course: React: Software Architecture

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Error boundaries

Error boundaries

- [Presenter] All right, so there's one more code splitting related thing that we're going to talk about, and that is something called ErrorBoundaries. Now, before I talk about what ErrorBoundaries actually are, let's discuss one of the problems with lazy loading, and that is, that this introduces new possibilities for errors into our application, right? So, before, when all of our code was just included in one big bundle, we knew that importing our components like we did up at the top here, wouldn't really cause any big problems, because, it's all included in the code. So, if something went wrong, it was a problem with the code as opposed to a problem with a network. However, now that we're doing this lazy loading thing, we're actually relying on the network to load our components, and what this means, is that we very well could end up in a situation where one of our components fails to load, and this causes an error.…

Contents