We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e832eb + 1b1e373 commit dbe1a17Copy full SHA for dbe1a17
src/createDispatcher.js
@@ -1,8 +1,12 @@
1
import composeMiddleware from './utils/composeMiddleware';
2
3
+const INIT_ACTION = {
4
+ type: '@@INIT'
5
+};
6
+
7
export default function createDispatcher(store, middlewares = []) {
8
return function dispatcher(initialState, setState) {
- let state = setState(store(initialState, {}));
9
+ let state = setState(store(initialState, INIT_ACTION));
10
11
function dispatch(action) {
12
state = setState(store(state, action));
0 commit comments