Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error boundries #43

Open
yoshuawuyts opened this issue Aug 7, 2017 · 5 comments
Open

Error boundries #43

yoshuawuyts opened this issue Aug 7, 2017 · 5 comments

Comments

@yoshuawuyts
Copy link
Member

In React 16 components introduce something new called error boundries. The main idea is that if an error is thrown from a component, it can be caught early, and prevents crashing the whole web page.

I find this interesting because:

  1. it means apps can keep running even if a component crashes (resiliency! :D)
  2. it'll play well with component.use (or similar); can send through the error to a local dev logger, or monitoring solution
  3. it's especially good to add resiliency when encapsulating 3rd party code - ideally code would never crash, but alas code isn't bug free

Thoughts?

@bcomnes
Copy link
Contributor

bcomnes commented Aug 7, 2017

How does this work? Wrap stuff in try catch?

@bcomnes
Copy link
Contributor

bcomnes commented Aug 7, 2017

I like the idea though.

@bcomnes bcomnes closed this as completed Aug 7, 2017
@bcomnes bcomnes reopened this Aug 7, 2017
@yoshuawuyts
Copy link
Member Author

Wrap stuff in try catch

yeah, pretty much haha

@ungoldman
Copy link
Member

I saw this on twétèr and thought the idea was interesting too. Would this be something baked in to nanocomponent or could it be maintained as a standalone module?

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Aug 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants