ctrlplusb / react-async-component

Resolve components asynchronously, with support for code splitting and advanced server side rendering use cases.
MIT License
1.45k stars 62 forks source link

App component rendered twice because of AsyncComponentProvider wrapper in RU #80

Open hguillermo opened 6 years ago

hguillermo commented 6 years ago

Hi @ctrlplusb

I am using the react-universally for a project and I noticed that the App component it is being rendered twice. The cause of the issue is the AsyncComponentProvider wrapper

  // Declare our React application.
  const app = (
    <AsyncComponentProvider asyncContext={asyncComponentsContext}>
      <StaticRouter location={request.url} context={reactRouterContext}>
        <App />
      </StaticRouter>
    </AsyncComponentProvider>
  );

This happens even if the DemoApp. Is this a known issue for the AsyncComponentProvider?