Well, not exactly. But the project itself isn’t doing very well and may kill your’s app performance and act in a way which you don’t expect it to. Here’s quick and concise rant after rewriting the app to get rid of redux-form. And here’s the reason why.
For those of you who haven’t been really trapped into building large and sometimes multi-step forms in React – it is a complex job. You have to keep track of all the fields state, including whenever the field has been touched, empty or contains invalid value.
But does that really needs Redux? Gosha Arinich has answered this question perfectly and I strongly encourage you to read his article.
Let me quote Dan Abramov, the father of Redux here:
Use React for ephemeral state that doesn’t matter to the app globally and doesn’t mutate in complex ways. For example, a toggle in some UI element, a form input state. Use Redux for state that matters globally or is mutated in complex ways. For example, cached users, or a post draft.
Sometimes you’ll want to move from Redux state to React state (when storing something in Redux gets awkward) or the other way around (when more components need to have access to some state that used to be local).
Over 8,500 stars on Github, 200 watchers, over 250 contributors.
And lots of unresolved issues. Sometimes the old ones, sometimes even without a single response.
You know that feeling when you use the library like it’s said in the docs and still getting weird errors? It happens to redux-form too. We’ve run into this too much often than we should.
Merging Pull Requests which contains breaking changes and no documentation updates is a serious crime.
Well, that’s a serious issue. “An image is worth a thousand words” they saying, so look at the following image. Every keystroke costs us re-rendering of the whole application. Let’s repeat: EVERY keystroke.
The colour lines on the gif above indicate re-rendering of the components. They wrap the whole app which basically means that every component updates on every keystroke.
But that’s just a simple 2 fields, example form. Imagine what will happen for a multi step wizard or registration form? Yeah, you’ve already got the answer.
Lots of code
According to the bundlephobia stats, redux-form weights 26.8kB minified and gzipped. It’s a way too much.
There are a few good recommendations to replace redux-form with. Even the maintainer and author of redux-form has started a new project called final-form. But I’m not buying it yet. Do you wanna use it in your project? Well, it’s your call. I’d say don’t.
Worth mentioning is the library called formik. Simple API, good docs, acceptable package size and no dependency on Redux. But it’s a topic for a separate article.