2 ms·
No, that's the opposite in my opinion. You should be catching errors. Ideally as early as possible. Most ideally when compiling your app, least ideally on a use
by jchw 9y ago
No, that's the opposite in my opinion. You should be catching errors. Ideally as early as possible. Most ideally when compiling your app, least ideally on a user's computer. I think a previous article on HN elegantly put it as, "move errors to the left."
While this is more of a lateral move, it's an important one. Before, an error during render left your app in an undefined, potentially unstable state. Then, you might find some unrelated junk errors in your Sentry or whatever you use, and on top of that the user is wondering why when they click nothing happens.
Now, you can recover from an error completely, even if you don't have control over the code running in other components. That's a big deal when you might want to have third party components or something to that effect.