-
-
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
[Bug]: Source snippets clobber each other when you render a story more than once #20745
Comments
@shilman @JReinhold I was looking at this one, and it's not straightforward for the What if we include the rendered value of We could potentially send a hash of the args too, but I'm leaning towards the full values. |
Good idea @tmeasday - i guess the only issue is with blobby args, but that's an issue in general. Worth a try! |
Sounds like a good idea, except it might result in a very leaky memory footprint. Changing a label 10 time would make us store 10 different snippets. Are we flushing the snippets when stories get unmounted? |
Snippets are like a few 10s of bytes I'm not sure we really need to worry about it @JReinhold |
When you change away from the docs entry, yes. |
Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.48 containing PR #20915 that references this issue. Upgrade today to the
|
Describe the bug
When you render a story twice on the page (as in autodocs), it is keyed in the
SourceProvider
by id. This means when you change the primary story's args, the new args show up in the new secondary one.To Reproduce
Stories
blockThe text was updated successfully, but these errors were encountered: