Skip to content

Handle bad components #36

@RaitoBezarius

Description

@RaitoBezarius

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?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions