Hacker News new | ask | show | jobs
by rune-dev 30 days ago
Modern JS frameworks can absolutely catch and isolate errors. In those cases you’d only see the error in the specific component that had the error. Or if they’re a good dev you as a user won’t even know! You’ll see fallback content.

An error blocking the full screen is a failure on the developer not the tools.

1 comments

> An error blocking the full screen is a failure on the developer not the tools.

I don't see how this is possible, given that the default experience with HTML and JavaScript isn't "Tear down the entire page to display an error", but something that's seemingly becoming more and more common to actually come across. Guess I need to chase down what library/framework this is coming from, since seemingly I'm not able to describe the issue properly.

You don't need the "modern JS framerwork" to "catch and isolate errors" because that's a feature JavaScript comes with by default in browsers! You literally have to add code to make it worse, which seems to be happening in some framework/library.

If you're manually adding logic for doing "error in component doesn't break entire application" then you're already working against what the environment gives you by default for free.