About formik performance #3186
-
So currently we're developing an app that is basically a page editor. Think Figma but way more specific to the industry that our company is in. User can drop "components"(not in the React sense) into a page and configure them. I had the idea to have the whole thing as a formik form, as in when the file is loaded, have formik handle the current value and changes etc. The current way of doing things is updating a redux store, which works fine but if I could have it as a formik form, it might make the code cleaner/better dx. So, people who are familiar with the library, does this sound like a good idea? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Formik's current API isn't necessarily built for dynamic data like dropping in new components. It is heavily based around the concept of If it's really a page editor, I'd look to WordPress' Gutenberg for inspiration as they are really nailing it over there. |
Beta Was this translation helpful? Give feedback.
Formik's current API isn't necessarily built for dynamic data like dropping in new components. It is heavily based around the concept of
initialValues
and updating the values within them. It's not impossible to work around this limitation, but it won't be super straightforward if you planned to usetouched
on your new fields. This is probably Formik's 2nd biggest limitation currently.If it's really a page editor, I'd look to WordPress' Gutenberg for inspiration as they are really nailing it over there.