A
A
AltaiR2019-10-28 14:38:23
React
AltaiR, 2019-10-28 14:38:23

How to embed dynamic forms in React?

Hi all. I'm just starting my journey into React. There was such a question. There is a wizard where the user selects one of the proposed options:
5db6d265c8944741038654.png
And depending on the selected request, a form should appear on the next step:
5db6d28bd90c7171807461.png
These forms will radically differ depending on the selected request. I use formik for forms. Please tell me how to implement this, where to store these forms?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viacheslav Gordeiko, 2019-10-28
@AltaiR-05

As option - to store forms separate components. When selecting "Request 1" or "Request 2", etc. change state. Well, depending on the current state, render the desired form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question