Different ways of initializing a react redux store's initial global state?
问题 What are the different ways of initializing a react redux store's initial global state? I see two ways this redux could set an initial global state Let's say we have a single reducer and all the javascript is in one file. function rootReducer(state = "Initial Reducer State!", action){ switch(action.type) { case SET_TEXT: return "Ignore this case statement it won't run" default: return state; } } (1) I know you can use something like createStore(rootReducer, initialState) . const store =