-
-
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
HMR causes Stories of "..." named "..." already exists
error
#1581
Comments
I forgot the |
According to the screenshot we do throw an error 😂 The error we show is to prevent someone from adding a story with the exact same name twice.. But of course that is exactly what happens if HMR is not handled.. I guess we should move this error into a warning and let the rendering continue. |
Code for this error is here: |
Heh, yes, there is an error 😛 I'm thinking it may be helpful if Is a PR for this acceptable? |
We've discussed it here: #1506 So I've added the console warning to this.. |
Is the console warning shown in this case? We can't see in the screenshot. I think the correct behavior would be to accept the new story being injected, but show a warning in the console (PR welcome), and show an individual warning if What do you think @igor-dv ? |
Solved
Don't forget to include the
module
argument in yourstoriesOf
call 😉Original Post
I have a single
Example.stories.js
file. When making changes, I see this error after the HMR update. This bug was introduced within the last few days. Prior to that I had never seen this bug.Preview area
Example.stories.js
The text was updated successfully, but these errors were encountered: