3 ms·
I found react to be extremely intuitive and easy to learn. Redux and react-redux are horribly non-intuitive. So much boilerplate and meaningless terminology an
by tootie 9y ago
I found react to be extremely intuitive and easy to learn. Redux and react-redux are horribly non-intuitive. So much boilerplate and meaningless terminology and stringly-typed objects. I avoid it.
- pknopf 9y agoSwitching from Redux to Mobx dramatically decreased my mental load. It is much more straight forward.
- mephitix 9y agoI want to learn Mobx. I like the conceptual model (functional, immutable) of Redux though - I'm just not a fan of all the boilerplate although I understand why it is there. What's your take on things you miss from Redux now that you've switched over to Mobx?
- pknopf 9y ago> functional, immutable mobx-state-tree is what you are looking for. You can model it similar to your Redux setup. It is immutable. It also has the snapshot stuff Redux has.
- mieseratte 9y agoReact is just mapping data to XML, which may or may not end up as XML (React DOM vs. React Native). Throw in a component lifecycle, and you're good to go. Sure, it's not jQuery simple but for a modern SPA it's about as good as it gets. It allows you to just deal with things in terms of composed functions which is wicked elegant, and since you're almost surely thinking of your page and application hierarchically it maps to reality nice and clean. Redux makes managing global / central state reasonable, and in conjunction with the `connect()` function allows you to A) pull in needed global state and B) dispatch data to be centrally processed such that your component gets to not give a shit. It'll just update as-needed. It's dumb. Strings for types sucks (it's better with Flow, or Typescript I assume) but it is what it is... the immutability can also lead to some subtle bugs if you fuckup and mutate something, but overall I'd rather write a React app with Redux than without at this point just for ease of reasoning about the system as a whole. If you've never dealt with this type of architecture, it can be strange at first but it makes managing state / data flow much easier. [0] - https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0 https://medium.com/@dan_abramov/smart-and-dumb-components-7c...
- dimal 9y ago> React is just mapping data to XML Nit: It maps it to a virtual DOM, not XML.
- mieseratte 9y agoI'm assuming anyone writing React in this day and age is using JSX which is what I was referring to when I wrote that. That it transpiles down to something else is just an implementation detail to the developer. For all I care it could be jQuery statements :)