Member-only story
3 Reasons to Avoid Using ImmutableJS With Redux
Once it’s in, you’ll never get it out

Redux wouldn’t work without immutable data, and so it makes sense the immutable-js library — which helps to ensure immutability — has become used so frequently with Redux. But after working with ImmutableJS in a few large-scale React-Redux applications, it’s clear using the library comes at a price, and that once in, it’s difficult to opt out.
The three reasons to avoid using ImmutableJS with Redux are:
- It leaks into dumb components, making them impure and difficult to work with
- It can kill Redux performance
- It allows the application state to become complex and deeply nested
Before diving into these, here’s a brief run through of what immutability is, why it’s so important in Redux, and what ImmutableJS offers.
Immutability and Redux
Redux decides if a component should rerender by checking if any piece of the application’s state relevant to that component has changed.
When the application’s state is an immutable object — meaning that once created it can’t then be changed, or mutated — Redux can make this check very quickly and easily.