Skip to content

Instantly share code, notes, and snippets.

@ozcanzaferayan
Created May 19, 2020 15:40
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 ozcanzaferayan/776248470934c79e0d049161a0a3a1ff to your computer and use it in GitHub Desktop.
Save ozcanzaferayan/776248470934c79e0d049161a0a3a1ff to your computer and use it in GitHub Desktop.
const completeAt = (index) => {
const todos = [...todoList];
const todo = todos[index];
todos[index] = { name: todo.name, isCompleted: !todo.isCompleted };
setTodoList(todos);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment