October 2019
Intermediate to advanced
426 pages
11h 49m
English
Lastly, we are going to use the filterTodos method to dynamically filter our todo item list.
Let's start making the TodoFilter component dynamic:
export default class TodoFilter extends React.Component { render () { return ( <div> <TodoFilterItem {...this.props} name="all" />{' / '} <TodoFilterItem {...this.props} name="active" />{' / '} <TodoFilterItem {...this.props} name="completed" /> </div> ) }}
handleFilter () { const { name, filterTodos } = this.props filterTodos(name) }
Read now
Unlock full access