October 2019
Intermediate to advanced
426 pages
11h 49m
English
One of the simplest components to migrate is the TodoItem component. It does not use any state or side effects so we can simply convert it to a function component.
Let's start migrating the TodoItem component:
export default function TodoItem ({ title, completed, id, toggleTodo, removeTodo }) {
function handleToggle () { toggleTodo(id) } function handleRemove () { removeTodo(id) } ...Read now
Unlock full access