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

Decorators may get applied multiple times #835

Closed
shilman opened this issue Apr 15, 2017 · 7 comments
Closed

Decorators may get applied multiple times #835

shilman opened this issue Apr 15, 2017 · 7 comments

Comments

@shilman
Copy link
Member

shilman commented Apr 15, 2017

Issue by mnmtanish
Tuesday Jul 26, 2016 at 07:27 GMT
Originally opened as storybook-eol/react-native-storybook#50


Check whether this issue reported on react-storybook repo exists here. It is more likely that it does. Unfortunately we can't apply the solution used there because react-native HMR does not support dispose handlers. Investigate this issue and find a good solution.

If the issue exists, I think users can prevent it by manually calling clearDecorators from the config.js file. Global decorators are not that common so this issue is not critical. We can do it after optimising ios/android setup guides.

@shilman
Copy link
Member Author

shilman commented Apr 15, 2017

Comment by mnmtanish
Tuesday Nov 08, 2016 at 11:06 GMT


TODO:

  • try to reproduce this issue and check whether it exists
  • find a solution without adding extra config for users

@shilman shilman added the bug label Apr 15, 2017
@ndelangen
Copy link
Member

I'd expect this issue to have gotten some +1s if what's described here truly happens.

If you are experience this issue, please re-open!

@macrozone
Copy link
Contributor

macrozone commented Oct 18, 2017

@ndelangen yes, this happens.

It happens when your decorator is a class. You need to have a class when you use styled-components and want the theme to be hot-reloadable see comment below

@macrozone
Copy link
Contributor

macrozone commented Nov 2, 2017

Any update or workarounds for this?

Edit: What i said above is not true, it also happens if your decorator is a stateless component

@ndelangen
Copy link
Member

changes made to react version:
https://github.com/storybooks/storybook/pull/335/files

@stale
Copy link

stale bot commented Dec 19, 2017

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 60 days. Thanks!

@stale stale bot added the inactive label Dec 19, 2017
@stale
Copy link

stale bot commented Jan 3, 2018

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

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