I'm refactoring an Angular 1 app to React and I really love the fact that it
gets rid of all the Angular Magic.
10 replies
I've used http://redux-form.com and although it starts of nice and easy, it's
not ideal for more custom forms.
Like onblur save, then reuse the form. It abstracts aways too much for that, in
a non react way.
Especially that the form state when submitting is handled through a Promise is
so non-react.
Combining that with a middleware makes the code handling it totally bonkers:
I'm now looking to replace it with
http://davidkpiano.github.io/react-redux-form/, which is just (local) state
and reducers.
I'm diving into redux and really like how using middlewares manages to separate
async tasks from UI changes. No controller necessary.
And since middlewares are driven by actions they are really expressive about
their behavior.
Also great: contract between UI and middleware are actions, not methods. Simple,
generic, interceptable coupling.
It's so great to just get rid of all the scope stuff. Handling forms (errors,
validation) is so much better AND pluggable.
React Apps are composed using plain JS modules. No Service Factory foo. It's way
easier to understand and Backend devs will understand it.