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

Play nice with Storybook #169

Open
thany opened this issue Nov 4, 2020 · 3 comments
Open

Play nice with Storybook #169

thany opened this issue Nov 4, 2020 · 3 comments
Labels
needs-reproduction Potential bug, but needs a reproduction (test case or more detailed documentation)

Comments

@thany
Copy link

thany commented Nov 4, 2020

Using react-tracking in Storybook causes issues, when also using addon-knobs.

I've been able to boil it down to the track() decorator that appears to do something that messes things up. When I remove that, it works great, but without tracking.

Please refer to this issue: https://github.com/storybookjs/storybook/issues/13011

I'm creating this issue here, simply to create awareness of this from your end.

@tizmagik
Copy link
Collaborator

tizmagik commented Nov 5, 2020

Thanks for raising this, @thany -- I'm not sure I quite understand the issue or what we can do differently in react-tracking to help. Any ideas?

@tizmagik tizmagik added the needs-reproduction Potential bug, but needs a reproduction (test case or more detailed documentation) label Nov 5, 2020
@thany
Copy link
Author

thany commented Nov 11, 2020

I don't really know what's happening in the background. Something appears to be happening, something is added or changed on a decorated component that the Story component from Storybook doesn't really like. But what exactly? I was hoping, if you have the time of course, you might be willing to collab with the Storybook guys to figure it out.

@tizmagik
Copy link
Collaborator

Do you notice this on both class-based and function-based components? I took a quick look and I noticed that neither your withTracking and their withKnobs wrappers hoist-non-react-statics as we do in react-tracking -- I'm not sure if that might be affecting things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reproduction Potential bug, but needs a reproduction (test case or more detailed documentation)
Projects
None yet
Development

No branches or pull requests

2 participants