One may also ask, what is immutable in programming? In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.
Besides reduced memory usage, immutability allows you to optimize your application by making use of reference- and value equality. This makes it really easy to see if anything has changed. For example a state change in a react component.
Do I need immutable JS?
When working with React and Redux, immutable data helps reinforce one of their core principles: if the app state has not changed, neither should the DOM. Many articles have been written about the benefit of using immutable data, some of the main benefits include: Removed requirement for defensive copying of data.