Skip to content

Instantly share code, notes, and snippets.

@davidgilbertson
Last active April 8, 2020 00:38
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/b4743be88d3022035784ddbea6e0b689 to your computer and use it in GitHub Desktop.
Save davidgilbertson/b4743be88d3022035784ddbea6e0b689 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