Last active
July 23, 2019 09:43
-
-
Save hosembafer/45d0a16ebeebde6c618eac9bc9526fa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useTodoListStore } from '../../store/TodoListStore'; | |
const TodoList = () => { | |
const { | |
tasks, | |
addTask, | |
renameTask, | |
removeTask, | |
} = useTodoListStore(); | |
return ( | |
<> | |
<TodoListItem addTask={addTask} /> | |
{tasks && tasks.map(task => | |
<TodoListItem | |
key={task.id} | |
{...task} | |
renameTask={renameTask} | |
removeTask={removeTask} | |
/> | |
)} | |
</> | |
); | |
}; | |
export default TodoList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment