-
Notifications
You must be signed in to change notification settings - Fork 36
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
Component gets unmounted = ref is null while I interact with a component #19
Comments
Good catch, thanks @albinotonnina. |
I started looking into this, and it's a quite interesting issue. |
My pleasure! I love snapguidist, makes my life easier :) I would look at it myself, at least to help, but it's beyond me at the minent :) keep up the great work Michele! |
The problem is related to the |
Relevant issue: styleguidist/react-styleguidist#614 |
This package has been updated to the latest version of Styleguidist (6.2.2) and React (16.2.0). <input ref={ref => ref && (myEl = ref)} /> |
Thanks Michele! I would close this. Unless you wanna leave it open in case of a fix! Ciao! |
Although there's no easy way to fix this properly, I'd leave it open so that it can be useful for other people. |
I'm not sure if this is in any way related, but I'm having a problem related to react-intl I created a Wrapper component that works with react-styleguidist, it wraps all components with the required But I get errors from snapguidist : Uncaught Error: [React Intl] Could not find required It seems like the snapshots are rendered without the styleguidist Wrapper. I don't know if I am doing something wrong, as I can't seem to find others with the same problem. I'd create an issue if I was sure this is really an issue, and not just me messing up the configuration. Any ideas would be appreciated! |
Hello Michele!
I was playing with this example in Styleguidist cookbook: how-to-use-refs-in-examples
Took me quite a while to understand why the example would not work on my almost clean version of styleguidist + snapguidist.
When I click the button in the even more simplified example below I get an error because snapguidist basically unmount the component so ref gets called with null (is that correct?)facebook/react#9328 (comment)
Could this lead to issues? I'm interacting with a component that is unmounted?
Example to try on a clean installation of styleguidist+snapguidist
The text was updated successfully, but these errors were encountered: