-
-
Notifications
You must be signed in to change notification settings - Fork 388
getState
changed its behaviour?
#114
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
Comments
Ok I figured out what happened. I used it like this const NotFoundPage = loadable(
() =>
import(/* webpackChunkName: "NotFoundPage" */ "src/pages/NotFoundPage/NotFoundPage")
); but instead it should be const NotFoundPage = loadable(
() =>
import(/* webpackChunkName: "NotFoundPage" */ "src/pages/NotFoundPage/NotFoundPage"),
{ modules: ["NotFoundPage"] }
); or use babel plugin. But I can not use second option because, I use un-ejected CRA project. Maybe babel-macro plugin instead of babel would work here. I wonder is there a way to make sure people aware of this issue, maybe |
I coded this macro for fun https://github.com/stereobooster/loadable-components.macro. It still needs some work, but mostly works. I can transmit this repo to you |
@stereobooster oh nice, we should put it back in the project! |
Loadable Components v3 has been released 🎉, please give a try. 👉 https://github.com/smooth-code/loadable-components |
I have something like this in my code (I can post reproducible example later):
When I start dev server (or do prerendering)
window.snapSaveState()
always returns empty array ({__LOADABLE_STATE__: []}
). DoesgetState
work on the client side or is it only for server or I should look for error somewhere else?The text was updated successfully, but these errors were encountered: