Why, in this challenge and the next, do we do this? I don’t understand to have the value attribute and the onChange handler.
This particular challenge does not use a value attribute, but the onChange handler is needed in order to update the state’s input property.
So why, in the next challenge (Create a Controlled Form), is the value attribute required? I don’t understand what use it has?
I have moved your question to it’s own topic, because it needs some attention and thee is no point in replying back and forth on the other user’s thread.
Actually, I misspoke in my first reply. It does have a value attribute in the previous challenge for the same reason it does in the Create a Controlled Form challenge. Input elements have value attributes. These are nothing special or new to React. The value attribute is what holds the current value of the input element at any given time.
Thanks so much for the in depth answer. I think I’ll need to practice some more to fully grasp the concept and will definitely be referencing back to this thread.