-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Options addon must be configured *after* the preview has rendered in React Native #1192
Comments
Hi, I'm not using RN but i got the error pointing to this issue after upgrading, is it normal? |
@slorber -- sorry i missed this. I think this error can sometimes happen if your |
We should see if #2711 can be used to resolve this. |
Will check next time I work on my storybook, haven't updated it for a while |
@FredyC -- the workaround of calling from a timeout should still work. I believe it turned out #2711 was an event from the manager side when the channel was created -- a similar change would be needed on the preview side to solve this issue (if I remember right). If someone is game to give it a go, it would be great! I think most of the core team doesn't use RN and is a little afraid to touch it, unfortunately. |
Actually, I just updated all packages yesterday and suddenly it seems to be working without any change. I guess some other change might have fixed it?
|
Well, it seems more like a random issue. Even with those updated packages, I have seen that error time to time so I ended up with the timeout workaround which seems to be working so far, but it would be nice to have a proper solution for that. |
@FredyC, hey. You are correct that this is a random issue. And the fix shouldn't be difficult. I would like to say that we can add the event to fix this issue (I would personally do it), but I have already failed multiple times to finish the functionality I am currently working on. If nobody will take this issue I will fix it, but I can't guarantee when I will do it. Sorry for that. |
@danielduan as far as I know this remains an issue. I have not quite been brave enough to touch RN (which i don't use personally day-to-day) to try and resolve it, but I suspect it wouldn't be very hard to fix. |
Any news on this? Keep randomly getting it all day long today. |
Hey, sorry for no bringing up no information, this issue was buried deep. #3903 will solve this issue. So you will be able to call:
and you won't have to use any timeouts. |
The #3903 was merged into the master. In Storybook v4 this issue is solved. |
As the addon channel is not created until render time in React Native (see #1191), we cannot call
setOptions
until after that has happened. In practice, this currently means in asetTimeout
block:Reproduction
#815 (comment)
The text was updated successfully, but these errors were encountered: