Hi I am working on React: Create a Controlled Input
I am not sure why my solution isn’t working. I am able to see the desired results. Can anyone please take a look.
Have a think about your component’s state, and this line:
<input type='text' value={this.state.value}
For future posts, if you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.
This is more of an accessibility issue, than anything else. It works for the same reason, if your remove the value attribute from the input it still works…because HTML is very forgiving, and any text input into the input will automatically be stored in the value of that input.