0

I'm creating a new project that incorporates react SSR with react-loadable. (based on https://github.com/jamiebuilds/react-loadable/tree/master/example)

The react-loadable docs mention that I need to add "Loadable.preloadAll()" to make sure that the SSR waits for the async components to be rendered. When I open the page source for the SSR, there is no async component and no loading component.

After bootstrapping in the browser, the async component is rendered.

The github:

https://github.com/Exomnius/spearhead/blob/master/packages/web/server/server.jsx

Loadable.preloadAll().then(() => {
  app.listen(3000, err => {
    if (err) {
      console.error(err);
    }

    if (__DEV__) {
      console.info('==>   Open http://%s:%s in a browser to view the app.', 'localhost', 3000);
    }
  });
});

Anyone has experience with this issue? Of am I missing a config? Thanks in advance!

Cornel Janssen
  • 681
  • 1
  • 11
  • 33

0 Answers0