Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dispatch(action) {
- /* Validation */
- try {
- isDispatching = true
- currentState = currentReducer(currentState, action)
- } finally {
- isDispatching = false
- }
- const listeners = (currentListeners = nextListeners)
- for (let i = 0; i < listeners.length; i++) {
- const listener = listeners[i]
- listener()
- }
- return action
- }
Add Comment
Please, Sign In to add comment