Skip to content

Instantly share code, notes, and snippets.

@davidgilbertson
Last active April 10, 2020 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidgilbertson/148b6a75bee2ccd75f9c71820d333561 to your computer and use it in GitHub Desktop.
Save davidgilbertson/148b6a75bee2ccd75f9c71820d333561 to your computer and use it in GitHub Desktop.
+import { store } from 'react-recollect'; // New line

export function toggleTodo(index) {
+  store.todos[index].completed = !store.todos[index].completed; // New line
  
-  return { type: TOGGLE_TODO, index }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment