Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Add boundary HoC #568

Open
blackxored opened this issue Nov 29, 2017 · 4 comments
Open

Add boundary HoC #568

blackxored opened this issue Nov 29, 2017 · 4 comments

Comments

@blackxored
Copy link

It would be nice to have an error boundary React 16 HoC. While most of us will have at most one in our entire app and might be overkill, I'm interested in exploring multiple and it would be really handy if we had an easy way to define those, hence I'm here ¯_(ツ)_/¯.
Between lifecycle and branch it could easily be done, the only missing question would be how to handle the case when we want to run arbitrary code (i.e error reporting).
What do you think? Does it fall within the scope of this library?

@istarkov
Copy link
Contributor

#452

@istarkov
Copy link
Contributor

Anyone had a real use case to use error boundaries on their projects? Why not just to fix errors?

@wuct
Copy link
Contributor

wuct commented Dec 3, 2017

@istarkov because an error might comes from third-party components?

@akomm
Copy link

akomm commented Mar 8, 2018

@istarkov your question: https://reactjs.org/blog/2017/07/26/error-handling-in-react-16.html
@blackxored IIRC lifecycle HOC will be deprecated.
@wuct also we do not live in a perfect world, where every error is fixed ahead of time.

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

No branches or pull requests

4 participants