React | React Forms | Question 5

Last Updated :
Discuss
Comments

Which of the following is the correct way to bind a value to an input field in React?

<input value="name" />

<input defaultValue={name} />

<input value={name} onChange={handleChange} />

<input onChange={handleChange} />

Share your thoughts in the comments