-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server rendering dynamic routes (require.ensure) produces client React warning #1500
Comments
I'm getting this too, using the same polyfill in fact. |
Hi, @jorge-pascual and @AndrewIngram Have a look at #1402 (comment) and see if this solves your problem |
Yup, that does the trick, thanks for the help! |
thank you @anatomic. After few tries, I can't catch the point... I think my client code is very close to yours (mine over Fluxible and yours over Redux)... however, the warning is still here... and React trigger the render again... var history = new BrowserHistory();
if (typeof history.setup === "function") {
history.setup();
}
var dehydratedState = window.App;
window.React = React;
app.rehydrate(dehydratedState, function (err, context) {
if (err) {
throw err;
}
window.context = context;
var routes = app.getComponent();
Router.run(routes, history, (err, initialState, transition) => {
React.render(
React.createElement(
FluxibleComponent,
{ context: context.getComponentContext() },
<Router children={routes} history={history} />
),
document.getElementById('app'),
function () {
debug('React Rendered');
}
);
});
}); |
Hi!
I'm using react-router v1.0.0-beta3 in a server rendering project with Fluxible. All is running really well now... but dynamic routes.
I have this route configuration
Where
./modules/invoiceCreate
isAll is working fine and I get the page composition that I expect... however, React in the client says...
If I use a static route, it works fine and React doesn't say anything...
Do anyone know if the router dynamic load has any issue with server-rendering?
Regards.
The text was updated successfully, but these errors were encountered: