3 ms·
I didn't know about this new library but from my benchmarks it was a night and day difference moving to Immutable data structures all the way down. I understand
by zelly 7y ago
I didn't know about this new library but from my benchmarks it was a night and day difference moving to Immutable data structures all the way down. I understand not wanting to recommend it to newbies, but it's actually good.
- acemarke 7y agoIf you can take a few minutes to read through https://redux.js.org/style-guide/style-guide#use-plain-javascript-objects-for-state https://redux.js.org/style-guide/style-guide#use-plain-javas... , and specifically the "Detailed Explanation" section there, I talked through all the perceived and actual perf benefits that you see with Immutable.js. In short, most of the benefits people _think_ they get from Immutable.js are just properties of immutable updates in general, and there's actually some pitfalls of using it. The only real unique benefit is faster copies of _very_ large objects. I'm not saying it's not helpful, just that it's not a silver bullet in and of itself the way some folks think it is, and that you can get similar benefits without the overhead of its API.