-
Notifications
You must be signed in to change notification settings - Fork 365
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
Need a helpful warning if studio is imported but no initialized #21
Comments
You're welcome @AriaMinaei ! |
Well if studio is present, all state loading is deferred to it. Otherwise, we'll have a situation where the state jumps from one that is provided to core, to one that studio has saved in localStorage. |
But shouldn't that only happen if we call |
I see what you mean. The word "initialize" implies that, if not called, then it shouldn't affect anything. So The reason it doesn't work that way is that there is no use in having That's why I thought it's better to just warn the user if they're not calling |
@AriaMinaei this looks to be closed by this commit. |
this issue is still an issue when using cdn with the old 0.5v |
Since tree-shaking in different build systems is not bullet proof, there are situations where the user intends for
@theatre/studio
to not be included in the bundle but it still ends up in there. We can help the user avoid this situation by emitting a warning if the studio is imported butstudio.initialize()
is not called within a time period.Thanks @RuiOrey for the report :)
The text was updated successfully, but these errors were encountered: