-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Babel constructor only being called once #81
Comments
As a result of this problem, the state of the second instance is for some reason whatever the initial state was on the first one. |
+1. I find that I am unable to utilise defaultProps when creating multiple stories for a given component |
I think I know the issue. See: |
Check version: |
Yeah, works for me. Cheers |
Great. Closing this then. |
Works like a charm. Thanks @arunoda |
Make selectors Storybook 8 compatible
I have googled everywhere and I cannot find someone with a similar complain regarding React, so I would appreciate it if you take a moment and see if this could be a bug in Storybook. Consider this component:
And this story definition:
This uses hyperscript (I wanted to check it wasn't an issue with JSX, but it behaves exactly the same). Basically the alert on the constructor of the component is only triggered once, even though there are two instances of the component, one per story.
If I render in the root element of my app the following component with two instances of
MailInput
I get expected alert twice:I have verified that this problem only happens inside storybook, but I cannot explain why. I don't see how the instantiation of the controller would be affected. Maybe it has something to do with hot-reload?
The text was updated successfully, but these errors were encountered: