Adding state to TodoList

We'll need some state in src/TodoList.js before we can do much else, so we'll just create an initial state that's not too exciting but gets the job done. Add a constructor to the TodoList component and give it the following body:

constructor(props) {
super(props);
this.state = { items: ['Item #1', 'Item #2'] };
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.118.95