Guest User

Untitled

a guest
Jan 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function dispatch(action) {
  2. /* Validation */
  3.  
  4. try {
  5. isDispatching = true
  6. currentState = currentReducer(currentState, action)
  7. } finally {
  8. isDispatching = false
  9. }
  10.  
  11. const listeners = (currentListeners = nextListeners)
  12. for (let i = 0; i < listeners.length; i++) {
  13. const listener = listeners[i]
  14. listener()
  15. }
  16.  
  17. return action
  18. }
Add Comment
Please, Sign In to add comment