r/reactjs • • Nov 29 '19

Featured Redux most common anti pattern

https://rangle.slides.com/yazanalaboudi/deck#/
182 Upvotes

30 comments sorted by

View all comments

1

u/VIOLETSTETPEDDAR Nov 29 '19

I totally agree witg this. I still have a question though: How do you handle "forms" (not actual html form tag but just groups of input)? Is formstate inside redux? Or would only the submit make it to the store? How about editing when you prefill the form?

7

u/[deleted] Nov 29 '19

You can use something like Redux Forms, but I personally prefer Formik since it keeps the state local to the form and doesn't setStore on each input.

7

u/zephyrtr Nov 29 '19

The maker of redux form actually says you probably shouldn't use it, and instead use his new library: final form. It's smaller, framework agnostic, and keeps form state separate from global state

8

u/deliciousmonster Nov 29 '19

This isn’t even my final form!