DEV Community

Discussion on: Dynamic Form Fields in React

Collapse
 
foxbit19 profile image
foxbit19

Thanks for sharing!
I like this trick to mantain the original values untouched: const values = [...inputFields];.
It's better to create a copy...even more when the original values are used as component state.

Collapse
 
fuchodeveloper profile image
Fredrick Mgbeoma

I'm glad to know the article was helpful to you.
Thanks for your feedback.