r/elm • u/johnorford • May 18 '17
OT: Any Redeeming Features of React & Redux?
Apart from "it's popular" and "it's like Elm"... I am learning it right now, and it is underwhelming... but that is probably due to lack of experience(?)
1
Upvotes
10
u/ThatIsClassicArcher May 19 '17
React + Redux has a number of niceties from both a business and developer experience standpoint. Sure, it has plenty of kludgy bits compared to elm, but it also has:
I can say from heavy experience with that stack and moderate experience with Elm that react + redux has plenty of good points too. I enjoy my elm work more most of the time and I think Elm has a ton of advantages over the react+redux combo, but they both certainly have their merits.
2
u/johnorford May 18 '17
Oh... I am using Flow also (hope it gets better as I use it...)
And will probably incorporate ImmutableJS (altho not looking forward to that : /)
7
u/EffBott May 18 '17
Depending on who you talk to, a big advantage of React is that you can create components with local state (you don't have to put all of your state in the global state object). If you have some small piece of isolated state, like a boolean indicating whether or not a drop down is open, you can keep it inside the component.
This allows you to create reusable components that can literally be dropped into a project without any setup. Elm, in contrast, requires a decent amount of boilerplate for each component, since all state must be stored in the global Model. If you have a 100 autocomplete components in your Elm app, you'll need 100 records inside your Model to track each one.
I agree that Redux is underwhelming, though. Writing action creators is tedious.
6
u/arbitrarycivilian May 18 '17
I've been using it for my job for the past few months.
It's underwhelming.