Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addTodo({ value: event, state }) {
event.preventDefault()
state.todos.unshift({
id: String(Date.now()),
title: state.newTodoTitle,
completed: false,
})
state.newTodoTitle = ''
},
toggleCompleted({ value: todo }) {
todo.completed = !todo.completed
},
},
})
export const connect = createConnect(app)
export default app