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

Storybook 'freezes' on specific component #1252

Closed
KadoBOT opened this issue Jun 11, 2017 · 7 comments
Closed

Storybook 'freezes' on specific component #1252

KadoBOT opened this issue Jun 11, 2017 · 7 comments

Comments

@KadoBOT
Copy link

KadoBOT commented Jun 11, 2017

I'm not sure if some incompatibility with my component, storybook bug or I did something wrong, but if I switch to 'Checkbox' story I can't go back to the other stories. I can click on any left menu item, but the changes are not reflected. The 'Button' story works tho. If I refresh the page on any of the checkbox stories, it shows the desired state, but I can see another story without refreshing it again.

This is the repo that I'm talking about: https://github.com/KadoBOT/reacterialize/blob/master/src/stories/index.js

@shilman
Copy link
Member

shilman commented Jun 11, 2017

@KadoBOT looks like a bug. have you tried stripping down the component in question? I noticed there's a lot going on in Checkbox, e.g. unmounting logic. Removng this temporarily might help isolate what's causing the problem.

@KadoBOT
Copy link
Author

KadoBOT commented Jun 11, 2017

@shilman not yet. Let me try, and I'll let you know what is causing the problem.

@KadoBOT
Copy link
Author

KadoBOT commented Jun 11, 2017

Looks like is something related to the element 'ref'. In the setRef method, if I set the ref based on the element id, it works. But if not, It throws a bunch of errors (i.e ref={ref => {this.foo = ref}}.

So my guess is that is not a bug with storybook but with referencing the element inside the component.

@shilman
Copy link
Member

shilman commented Jun 11, 2017

@KadoBOT thanks for tracking that down. it could still be a "bug" that storybook doesn't insulate you from this kind of thing, or swallows the error messages, or something. i'll leave this open for a bit in case anybody else has any thoughts on it. if not, i'll close it in a week or so if that's cool with you!

@KadoBOT
Copy link
Author

KadoBOT commented Jun 12, 2017

Yes, leave that open. I also think it is swallowing error messages.

@switz
Copy link

switz commented Jun 15, 2017

I'm also seeing this on some malformed components, but I'm not entirely sure how to reproduce it. Will update here if more info comes to light.

Tab memory starts climbing aggressively and Chrome tab freezes -- may be related to a circular dependency, but no errors are thrown.

@danielduan
Copy link
Member

If this is still an issue, please reopen this.

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

5 participants