Angular like reactive forms in react.

Forms are the essential part of a web application, managing the form state especially in a library like react which doesn’t support two way data binding is not a easy task.

There are two ways to create forms in angular, one is template-driven-form and the other is [reactive-form](https://angular.io/guide/reactive-forms).Template forms are good but only for the smaller forms but when you have to deal with larger form reactive-forms works like a magic.

Reactive forms or data-driven-form in angular are quite popular and provides a better structured way to build and control your forms.

Now come to the react, it has many third party libraries to control the forms but they all are not much rich in features.

Problems with the current libraries

Some common problems with the current libraries are:-

Solution

When first time I worked with the reactive forms in angular(after working on react), I was amazed.It was super easy & too impressive, then I thought that there should be something like that in react.

So, finally the wait is over.🎉

React-Reactive-Forms

Today I’m launching [react-reactive-forms](https://github.com/bietkul/react-reactive-form.git), a library which comes with zero dependency and is same powerful as the reactive forms of angular.It allows to create a tree of form control objects in the component class and bind them with native form control elements.

It solves most of the problems with the current available form libraries in react.

How to use it?

So, the people from angular background will feel right at home, because all api’s naming conventions are same.

A simple form using react-reactive-form.

Check out this example, a complex user registration form with synchronous, asynchronous validators, nested forms and updateOn feature.

A complex user registration form with react-reactive-forms.

For more details, see the docs.

Roadmap

It’s just the beginning, more is coming. Some upcoming features are:

Conclusion

This library is an effort to introduce one of the best feature of angular in react and now I’m just waiting for the feedback and suggestions from the community.

Let’s make React Reactive Forms better! If you’re interested in helping, all contributions are welcome and appreciated.

Thanks for reading! Give it a try, Please do 👏 if you liked this post and don’t forget to star the repo, I will ensure more frequent updates!🙏

bietkul/react-reactive-form_react-reactive-form - Angular like reactive forms in React._github.com