And I can still select text in the input fields and, if I could actually make changes, it would be editableĪll of that needs to be wired up correctly. If I click Finish, the text on the button doesn't change as it should. So if I try to make changes in these input elements, nothing happens. Right now, it's rendering just fine over on the right side, but we can't actually change these things in the state of our TodoList component. Then we have a button which we can use to "Finish" or "Unfinish" a task. If this to-do item is done then the value is not editable-it's read-only. Then in the TodoItem component, we just render a list item with an input box which has the value. Then we can render our list of to-do items in the TodoItem component. The TodoList component just has a list of to-dos in its state, and each one has a text property and a done property. We have two components already built: a TodoList component and a TodoItem component. In this challenge, you're going to create a basic to-do list app in React.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |