Created
July 6, 2016 19:06
-
-
Save derveloper/e74480aaf38a765cb3d4e37063f69350 to your computer and use it in GitHub Desktop.
kiste bier ist mir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fooDispatch function dispatch(action) { | |
return _dispatch(action); | |
} | |
store.js?5dc3:13fooNext function (action) { | |
console.log("barDispatch", dispatch.toString()); | |
console.log("barNext", next.toString()); | |
next(action); | |
} | |
store.js?5dc3:17barDispatch function dispatch(action) { | |
return _dispatch(action); | |
} | |
store.js?5dc3:18barNext function (action) { | |
console.log("bazDispatch", dispatch.toString()); | |
console.log("bazNext", next.toString()); | |
next(action); | |
} | |
store.js?5dc3:22bazDispatch function dispatch(action) { | |
return _dispatch(action); | |
} | |
store.js?5dc3:23bazNext function dispatch(action) { | |
liftedStore.dispatch(liftAction(action)); | |
return action; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const store = createStore(rootReducer, initialState, compose( | |
applyMiddleware(thunk), | |
applyMiddleware(routerMiddleware(browserHistory), | |
({dispatch}) => next => action => { | |
console.log("fooDispatch", dispatch.toString()); | |
console.log("fooNext", next.toString()); | |
next(action); | |
}, | |
({dispatch}) => next => action => { | |
console.log("barDispatch", dispatch.toString()); | |
console.log("barNext", next.toString()); | |
next(action); | |
}, | |
({dispatch}) => next => action => { | |
console.log("bazDispatch", dispatch.toString()); | |
console.log("bazNext", next.toString()); | |
next(action); | |
} | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tatsächlich heißt erst die letzte Funktion wieder dispatch()
https://gist.github.com/fuglu/8f3ad35e362f859a415e34e36ab291b1
🍻 kommt!