Last active
March 20, 2017 22:08
-
-
Save StevenJL/c0c976027ec2a7e7aca2 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
| export function addTodo(text){ | |
| return { | |
| type: "ADD_TODO", | |
| text: text | |
| } | |
| } | |
| export function completeTodo(index){ | |
| return {type: "COMPLETE_TODO", index} | |
| } | |
| export function setVisibilityFilter(filter){ | |
| return {type: "SET_VISBILITY_FILTER", filter | |
| } | |
| // assuming `appStore` is the application's store | |
| // you can also send an action creator as an argument to `dispatch` | |
| appStore.dispatch(completeTodo(5)) | |
| appStore.dispatch(addTodo("Watch 'Feeling Minnesota'")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment