October 2019
Intermediate to advanced
426 pages
11h 49m
English
Now, we define the TodoList component, which is going to make use of the TodoItem component. For now, we are going to statically define two todo items in this component.
Let's start defining the TodoList component:
import React from 'react'import TodoItem from './TodoItem'
export default class TodoList extends React.Component { render () {
const items = [ { id: 1, title: 'Write React Hooks book', completed: true }, { id: 2, title: 'Promote book', completed: false } ]
Read now
Unlock full access