-
-
Save rbiggs/b452625ff13de9bf36629be61f472539 to your computer and use it in GitHub Desktop.
Actions for the program's update method
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
| // actions gets two arguments: state and the message we send | |
| function actions(state, message) { | |
| switch(message) { | |
| case 'updateInputValue': | |
| // Update state with new value: | |
| state.inputValue = message.value | |
| // Don't forget to return state: | |
| return state | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment