Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Last active March 20, 2017 23:18
Show Gist options
  • Save StevenJL/7a502678accb020fad19 to your computer and use it in GitHub Desktop.
Save StevenJL/7a502678accb020fad19 to your computer and use it in GitHub Desktop.
// example of a store for a todo app
{
visibilityFilter: "SHOW_ALL",
todos: [
{text: "Give the monkey a haircut", completed: false},
{text: "Buy tuxedo for pet snake", completed: true},
{text: "Listen to Captain Beefheart's 'Troutmask Replica'", completed: false}
]
}
// another implementation of the store
{
visibilityFilter: "SHOW_ALL",
todosById: {
12: "Give the monkey a haircut",
4: "Buy tuxedo for pet snake",
1: "Listen to Captain Beefheart"
},
completedTodos: [ 12, 4 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment