4 ms·
I have made several relatively large systems using Redux, and it has become a necessity in order to handle complexity of new features. Overcoming the initial co
by lpa22 10y ago
I have made several relatively large systems using Redux, and it has become a necessity in order to handle complexity of new features. Overcoming the initial cognitive load takes a week or two, but as your system grows, your productivity and code organization is greatly improved. I also recommend Immutable for handling the state object and reselect for computing your container state properties. Those technologies together are a pleasure to develop with.
- rattray 10y agoHow does https://github.com/kolodny/immutability-helper https://github.com/kolodny/immutability-helper compare to Immutable in your experience? The latter seems potentially more performant and lighter-weight; curious what its disadvantages might be (the syntax?)
- acemarke 10y agoI personally recommend against using Immutable.js, for a number of reasons (which I wrote as a Reddit comment a while ago [0] ). There's some additional info on Immutable.js-related perf in my links list [1] FYI, there's also a bunch of other immutable update utility libs besides immutability-helper. I have a list of them in my Redux addons catalog [2]. [0] https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abramov_redux_is_not_an_architecture_or/d51g4k4?context=3 https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abra... [1] https://github.com/markerikson/react-redux-links/blob/master/react-performance.md#immutable-data https://github.com/markerikson/react-redux-links/blob/master... [2] https://github.com/markerikson/redux-ecosystem-links/blob/master/immutable-data.md#immutable-update-utilities https://github.com/markerikson/redux-ecosystem-links/blob/ma...
- rattray 10y agoInteresting, thanks for sharing. I took a look at your list of links recently, actually – it was helpful. I'm considering syntax-level support for `immutability-helper`, which seems like the best all-around solution aside from its syntax. This is for a JS Dialect I'm building called LightScript[0]. Would look something like: store.people[0].friends[0].name~~set("Alice") which would compile to: update(store, { people: { [0]: { friends: { [0]: { name: { $set: "Alice" } } } } } }) Would love thoughts/feedback (here or on the project Gitter[1]) [0] http://lightscript.org http://lightscript.org [1] https://gitter.im/lightscript/Lobby https://gitter.im/lightscript/Lobby
- helb 10y agoOne thing i like about immutability-helper is their mongo-style syntax. Yeah, MongoDB might kinda suck for multiple reasons, but the query syntax is quite nice IMO.