Unable to use CustomErrorBoundary component due to Storybook's internal ErrorBoundary #21855
Replies: 3 comments 2 replies
-
Watching...we want to show our "break things" UI based on error triggered. I have tried:
with Custom Error Boundary Class:
the |
Beta Was this translation helpful? Give feedback.
-
I'm also having this issue |
Beta Was this translation helpful? Give feedback.
-
Same here, I want some components to throw exceptions that are catched higher up in the component hierarchy by error boundaries (so a tad different use case). The best would be to have a decorator that could be added to the story for this I think (something like this, but working, as I did not get this example working, and I was unable to find a way to stop storybook from picking up the exception) |
Beta Was this translation helpful? Give feedback.
-
I'm trying to create a CustomErrorBoundary component in my Storybook project, but I'm having trouble using it because the internal ErrorBoundary that Storybook provides as a wrapper for is being rendered instead of my custom component.
I've tried creating a
<CustomErrorBoundary>
component, forcing an error at runtime for children, and wrapping my story components with it, but it doesn't seem to have any effect. It appears that Storybook's internal ErrorBoundary is still being used instead.Is there any way to disable the internal ErrorBoundary that Storybook provides as a wrapper for
<Docs/>
?Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions