Last active
March 14, 2017 05:21
-
-
Save bmeurer/41ff229f056c900eace1cf052496eee2 to your computer and use it in GitHub Desktop.
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 s1 = todo({}, { | |
type: 'ADD_TODO', | |
id: 1, | |
text: "Finish blog post" | |
}); | |
const s2 = todo(s1, { | |
type: 'TOGGLE_TODO', | |
id: 1 | |
}); | |
function render(state) { | |
return state.id + ": " + state.text; | |
} | |
render(s1); | |
render(s2); | |
render(s1); | |
render(s2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment