Skip to content

Commit 35dbaf8

Browse files
committed
React "prefers" if we get the __INITIAL_STATE__ var _before_ actually using it.
(otherwise, there is the infamous react warning complaining that the state being different on client and server, he had to re-render everything client side ...)
1 parent 1a0215c commit 35dbaf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ const rootElement = document.getElementById('app');
2626

2727
// Creates the Redux store based on the initial state passed down by the server
2828
// rendering.
29+
const initialState = window.__INITIAL_STATE__;
2930
const store = configureStore(initialState);
3031
const history = syncHistoryWithStore(
3132
(__CORDOVA__ ? hashHistory : browserHistory),
3233
store
3334
);
34-
const initialState = window.__INITIAL_STATE__;
3535

3636
/* FastClick
3737
* Disables the 300ms delay for mobile apps. Comment out or add a conditional

0 commit comments

Comments
 (0)