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

Simplify wrapper with storybook hooks API #97

Merged
merged 1 commit into from
May 7, 2021

Conversation

shilman
Copy link
Member

@shilman shilman commented May 2, 2021

Issue: N/A

What I did

I saw a problem where the design wasn't loading on the initial story until I switched stories and switched back. When I looked at the addon source I found that it's reimplementing a bunch of state management that's already handled by Storybook's hook API. So I updated the code accordingly.

How to test

I ran the example in the monorepo to check the different examples, but I'm not sure I tested all cases. If you can test it or suggest the best way for me to test it, I'd be happy to follow up.

Copy link
Collaborator

@pocka pocka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shilman
Thank you for the PR!

One question: which version of Storybook the hooks API is first implemented?
I'm asking because this addon currently supports Storybook@>=5.0.0 so I need to bump it (README and package.json maybe) before shipping this PR.

@shilman
Copy link
Member Author

shilman commented May 2, 2021

I think the hooks were introduced in 5.1, but didn't stabilize until 5.2 or 5.3. We want people to upgrade to 6.0+, so bumping the addon's support to 6.0+ would certainly help that 😉

@pocka pocka merged commit 41f392b into storybookjs:release/v6.0 May 7, 2021
@pocka
Copy link
Collaborator

pocka commented May 7, 2021

The problem has been there so long and some (many?) users reported bugs related to it. Less side-effect = More happiness.

Huge thanks!

pocka added a commit that referenced this pull request May 7, 2021
*Related:*
<#97 (comment)>

Storybook team recommends to users to upgrade to v6. v5 has different
CSF syntax and supporting broad range of versions is hard for me.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants