Loadable components not rendering on server
See original GitHub issueLoadable component on ssr not rendering on server but works fine on client side. In my main container header and footer is rendering on server only component with loadable is not loading on server
react version
"react": "^16.12.0" "react-router-config": "^1.0.0-beta.4", "react-router-dom": "^4.3.0", "react-router-redux": "^5.0.0-alpha.9"
server.js
<ChunkExtractorManager extractor={extractor}> <Provider store={store}> <StaticRouter location={location} context={context}> <ReduxAsyncConnect routes={routes} /> </StaticRouter> </Provider> </ChunkExtractorManager>
Client.js
loadableReady(() => { hydrate( <Provider store={store}> <ConnectedRouter history={history}> <ReduxAsyncConnect routes={routes} /> </ConnectedRouter> </Provider>, document.getElementById('app') ); })
Webpack plugin also added. stats.json file is created with chunk hash values. What am i doing wrong here? Please help
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (4 by maintainers)
Top GitHub Comments
How did you export the components ? And how you are dynamically importing for creating chunks ?
export will always be default for loadable I corrected above two areas and it worked.
Note that in a recent update this is now configurable.