-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
fix: CalledPreviewMethodBeforeInitializationError (8.2) #587
Conversation
thanks @stevoland 🙏 |
seem to be getting a build error here Error: src/View.tsx(151,25): error TS2445: Property 'storeInitializationPromise' is protected and only accessible within class 'Preview' and its subclasses. I wonder if theres another way to call it. |
Bah, sorry didn't get the tests to run locally. The error message says initializationPromise but that's undefined. I'll have a dig around |
I guess we can just add a subclass and expose it https://github.com/storybookjs/react-native/blob/feat/v8/packages/react-native/src/Start.tsx#L211 |
Hmm, actually leave this for now. There's a ready() method on preview to use but also I get another early initialisation error when web socket is enabled so needs more work |
This reverts commit fef8b08.
Ok, I think this does the job now, thanks |
sorry for not following up earlier I've had a lot going on, taking another look now |
seems to be working, thanks for the fix 🙏 |
Fix this error in 8.2-alpha1 with large number of stories:
What I did
Add waits for initialization
How to test
Start with large number of stories, eg: stevoland@aca843b