Skip to content
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

Preact: Updating args causes a full refresh #19504

Open
tmeasday opened this issue Oct 16, 2022 · 5 comments
Open

Preact: Updating args causes a full refresh #19504

tmeasday opened this issue Oct 16, 2022 · 5 comments

Comments

@tmeasday
Copy link
Member

Describe the bug
Preact version of #13913

Seems like it was originally fixed in #12221 but regressed (perhaps in preact 10?)

@KrofDrakula
Copy link
Member

@tmeasday I thought that was intentional; I've seen this behaviour last time I was diving in the story rendering code, but wanted to preserve existing behaviour since I didn't really know whether it was intentional or not.

@tmeasday
Copy link
Member Author

Hey @KrofDrakula. I'm not quite sure what was intended by who/when but the "correct" behaviour in Storybook is that the story/component should remount when you change story (or a couple other events) but should re-renderer without remounting when you change args or globals.

@KrofDrakula
Copy link
Member

@tmeasday Yeah, that makes much more sense to me; it always bothered me that it completely unmounted the components when changing any parameter.

@TiborUdvari
Copy link

I'm getting this issue with

    "preact": "^10.24.3",
    "storybook": "^8.4.2",

I see the code you changed now lives here:

if (['web-components', 'html', 'preact'].includes(globalThis.storybookRenderer)) {

But it does not include vue3 or svelte anymore, so maybe there were some changes in the meantime that broke this functionality.

I would like to help more, but I'm unfamiliar with the codebase.

@tmeasday
Copy link
Member Author

tmeasday commented Nov 6, 2024

@TiborUdvari

But it does not include vue3 or svelte anymore, so maybe there were some changes in the meantime that broke this functionality.

That code was disabling the test in vue3/svelte, so the removal of them from the list means they were fixed. You can see the vue fix in this PR:

#20712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants