-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yetUsed to close PRs that haven't gone through/been accepted the Proposal process yet
Description
I use server side rendering with some code splitting routes. It looks like OK on my server side with shim require.ensure
. But I get the following warning on my client side:
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) ctid=".bqth22sav4"><noscript data-reacti
(server) ctid=".bqth22sav4"><div data-reactid=
Here is the main part of my client side codes:
const store = createStore(getInitialState());
const history = createHistory();
const { pathname, search } = window.location;
const location = createLocation(pathname + search);
match({ routes, location }, (err, redirectLocation, renderProps) => {
render(
<Provider store={store}>
<Router
{...renderProps}
history={history}
/>
</Provider>,
document.getElementById('mount')
);
});
Regards.
Metadata
Metadata
Assignees
Labels
feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yetUsed to close PRs that haven't gone through/been accepted the Proposal process yet