bietkul / react-reactive-form

Angular like reactive forms in React.
MIT License
309 stars 32 forks source link

How can I use this with React functional components and hooks? #84

Closed ArchanaSharma95 closed 2 years ago

ArchanaSharma95 commented 2 years ago

While using inside React functional component my form variable initialize again and again after every render. Is there any working example with React Functional components and hooks?

bietkul commented 2 years ago

@ArchanaSharma95 You can use useRef hook to persist the form control, if you're creating it inside a functional component.