Last active
April 25, 2019 04:05
-
-
Save Sawtaytoes/1dfb1641f646c611513bd561500a0cdc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var subscribers = [] | |
var subscribe = function(subscriber) { | |
subscribers | |
.push(subscriber) | |
} | |
var dispatch = function(action) { | |
stateModifiers[action.type] | |
&& stateModifiers[action.type](action) | |
subscribers | |
.forEach(function(subscriber) { | |
subscriber(action) | |
}) | |
return action | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment