I
I
Ilya Soldatenkov2019-03-01 12:33:50
React
Ilya Soldatenkov, 2019-03-01 12:33:50

Is it correct to make forms in react stateless?

I have a large component that contains a list of items, a form with a bunch of fields and a bunch of selects. Actually, in the beginning, I tried to write the value of each field to the state of the form component, which caused performance problems.
I moved the state and handlers to the parent component and passed them as props to the form, this solved the performance problem. But the readability of the code is bad. How to make it cleaner and more correct?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-03-01
@Casufi

Try https://jaredpalmer.com/formik/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question