Las rutas asincrónicas provocan un error no válido de la suma de comprobación del lado del servidor
Estoy usando Webpack, react, react-router, react-redux, redux y simple-redux-router.
Recibí este error al usar react-router con rutas asíncronas y renderizado del lado del servidor:
bundle.js:1 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) <noscript data-reacti
(server) <div data-reactid=".1
Mis rutas.cjsx tiene esto:
# Routes
path: 'game'
getComponent: (location, cb) =>
require.ensure [], (require) =>
cb null, require './views/game'
Si lo cambio a esto, ya no aparece ese error:
# Routes
path: 'game'
getComponent: (location, cb) =>
cb null, require './views/game'
¿Hay una mejor manera de lidiar con este problema al usar rutas asíncronas?