October 2019
Intermediate to advanced
426 pages
11h 49m
English
After making our App component dynamic, it is time to make all of our other components dynamic as well. We are going to start from the top, with the AddTodo component.
Let's make the AddTodo component dynamic now:
export default class AddTodo extends React.Component { constructor (props) { super(props) this.state = { input: '' } }
handleInput (e) { this.setState({ input: e.target.value }) }
handleAdd () { const { input } = this.state const { addTodo ...Read now
Unlock full access