New Sep 18, 2024

Change Color of Dynamically created elements in React + React Hook Form

Libraries, Frameworks, etc. All from Newest questions tagged reactjs - Stack Overflow View Change Color of Dynamically created elements in React + React Hook Form on stackoverflow.com

I'm using React Hook forms to create some dynamic forms.

React Hook Forms has a function for creating repeatable elements called useFieldArray.

In some of these repeatable, dynamic elements I need to be able to change style attributes based on user selection.

I'm not sure how to target the styling of an element that is created dynamically. Anyone come across this problem and figure it out?

Scroll to top