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

Handle bad components #36

Open
RaitoBezarius opened this issue Feb 29, 2016 · 2 comments
Open

Handle bad components #36

RaitoBezarius opened this issue Feb 29, 2016 · 2 comments

Comments

@RaitoBezarius
Copy link

Sometimes, you have a bad component which will throw an exception at render.

It seems like that once they throw, you cannot remount any component after it due to the unmountComponent which will itself throw for internalInstance._currentElement (undefined on internalInstance).

I don't really know how we could implement this, maybe by wrapping the render method like react-transform-catch-errors does it.

(I wonder if this should be there or in the Cosmos suite, I believe that it's kind of low-level so it should be for react-component-playground, right?).

@ovidiuch
Copy link
Owner

ovidiuch commented Mar 2, 2016

Cosmos latest already embraces this, and the 0.14 boilerplate features react-transform-catch-errors integration. Did you try/use that boilerplate?

@RaitoBezarius
Copy link
Author

I think that I'm pretty sure I'm using react-transform-catch-errors on my playground configuration, but I admit that I could have got something wrong during the process.

Will double-check!

But nevertheless, why integrating at Cosmos level?

Thanks!

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

2 participants