
Reasons to Avoid Using ImmutableJS with Redux - leandrotk
https://medium.com/better-programming/3-reasons-to-avoid-using-immutablejs-with-redux-b0109d0123e8
======
acemarke
I'm a Redux maintainer, and I strongly agree with this post. I've been
suggesting that people avoid using Immutable.js for years [0]. There's just
not enough benefit.

Instead, we _do_ recommend that folks use the Immer library for immutable
updates [1], preferably as part of our new official Redux Toolkit package [2].

[0]
[https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abra...](https://www.reddit.com/r/javascript/comments/4rcqpx/dan_abramov_redux_is_not_an_architecture_or/d51g4k4?context=3)

[1] [https://redux.js.org/style-guide/style-guide#use-immer-
for-w...](https://redux.js.org/style-guide/style-guide#use-immer-for-writing-
immutable-updates)

[2] [https://redux-toolkit.js.org](https://redux-toolkit.js.org)

------
uptown
“A nested state is more likely to store duplicate data”

I’m not sure I follow why nested state is more likely to duplicate data.

~~~
acemarke
A typical example might be a blogging app where posts reference users. Each
separate post might have to have a copy of the same user object, whereas with
a normalized state structure [0], the posts reference users by ID, and there
is a single copy of each user object stored in a lookup table by ID.

[0] [https://redux.js.org/recipes/structuring-
reducers/normalizin...](https://redux.js.org/recipes/structuring-
reducers/normalizing-state-shape)

