Just create the form component that has the counter component within it? Make it a hidden field and update its value on a click of a button?
Apr 2, 2015
4
Level 3
React counter value in form
I just watched the Do you React? lesson series and I wonder how I would get my counter value posted with my form?
Normally I'd have a <input type=number min="0"> field but add and decrease buttons seems way better. My only concern is how to translate the React counter to the form the "React way".
My first thought was to hook an hidden input field and edit it's DOM value but it seems like it's completely the opposite of what the lessons was all about. Any ideas?
Please or to participate in this conversation.