Altering React Form But Input Value Not Editable
I came from angularjs background, with 2 way binding I don't have to worry much, just declare a submit function, I can get the changed or unchanged value. I'm stuck with react now.
Solution 1:
If you do not want to use Controlled Components then you can use Uncontrolled Components.
Specifically, you can use the defaultValue
prop instead of value
on your input
.
As to your second question, you will have to be more clear what you are asking or perhaps better to ask in a separate Q altogether.
Post a Comment for "Altering React Form But Input Value Not Editable"