Current section: Error Boundaries 59 exercises
Problem

Composition

Loading exercise

Transcript

00:00 So we've got this error right here. If you take a look at the console, it's going to say invalid time value. This is because somebody made a typo passing a string to create a date, and you're going to fix that typo eventually. But we want to handle this case. What if somebody does make that mistake in the future? We want to make the user experience even better.

00:18 So we're going to have to restructure our code a little bit so that we can wrap the bulk of the app in a single error boundary. So we can handle these surprising unexpected errors well. And then by the end of this, you should have something that looks a little bit like this. You're going to be using the fallback components API,

00:38 where you can pass your error fallback, and then the rest of the app goes inside of here. So that is your objective for this exercise. I think you'll do a great job. Have fun.