Skip to content

Commit

Permalink
SSR bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Krulis committed Nov 3, 2017
1 parent 8920f8c commit 37440f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const renderWithoutSSR = (res, renderProps) => {
};

const renderPage = (res, store, renderProps) => {
let reduxState = serialize(store.getState(), { isJSON: true });
let html = renderToString(
<Provider store={store}>
<RouterContext {...renderProps} />
Expand All @@ -69,7 +70,7 @@ const renderPage = (res, store, renderProps) => {
res.render('index', {
html,
head,
reduxState: serialize(store.getState(), { isJSON: true }),
reduxState,
bundle,
style: '/style.css'
});
Expand Down

0 comments on commit 37440f6

Please sign in to comment.