But there seems to be a bug that happens when I add a todo it adds 2 of the same items and when I try to remove it it gives me an error:
TypeError: toggleTodo is not a function
handleTodoClick
2 |
3 | export default function Todo({ todo, toggleTodo }) {
4 | function handleTodoClick() {
> 5 | toggleTodo(todo.id)
6 | }
7 |
8 | return (
But there seems to be a bug that happens when I add a todo it adds 2 of the same items and when I try to remove it it gives me an error:
TypeError: toggleTodo is not a function
handleTodoClick