You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this will REMOUNT your entire story every time, canceling any HMR and react-fast-refresh. This includes making any changes using the Controls addon will trigger a full remount of your story instead of re-rendering
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Totally right, I was experiencing this behaviour and I didn't know what was causing the issue, I came up to this thread and applied the suggested fix and now it is working. I think this should be fixed or documented
Describe the bug
In the docs
https://storybook.js.org/docs/react/writing-stories/decorators
decorators are being advised to be written using
<Story />
However this will REMOUNT your entire story every time, canceling any HMR and react-fast-refresh. This includes making any changes using the Controls addon will trigger a full remount of your story instead of re-rendering
As seen in #12255
To change this use
Story()
instead of<Story />
Please ether update the docs:
https://storybook.js.org/docs/react/writing-stories/decorators
or patch the decorators such that
<Story />
doesn't trigger a full remountTo Reproduce
Steps to reproduce the behavior:
Story => <Story />
in decoratorsuseEffect(() => console.log("REMOUNT"), [])
into the storyStory => Story()
The text was updated successfully, but these errors were encountered: