DEV Community

Cover image for Develop dynamic React forms with ease
Martí Serra Molina
Martí Serra Molina

Posted on

Develop dynamic React forms with ease

How would you create a form of multiple steps in which the questions asked in each step depend on the answers provided in the previous ones?

You may think that something you would have to do would be to code all the logic of this form. That's something you could certainly do, but it is tedious and cumbersome.

What if there was a better way? Well, now there is. Formity is an npm package that lets you create dynamic React forms with ease.

Dynamic forms are multi-step forms in which the questions asked in each step depend on the answers provided in the previous ones.

These forms are created using only JSON objects, so you are able to store them in JSON files, send them through the network and even store them in a database like MongoDB.

In these forms you can write all kinds of logic using variables, conditionals, loops and a lot of different types of operators (arithmetic, comparison...).

You can check out this package here.

Top comments (0)