What is immutable.js?
Advantages of Immutability
The main advantages of immutability are predictability, performance and better mutation tracking. When working with front-end libraries, we declare a lot of state in them. We also often perform some asynchronous actions and update the original state. When the user starts performing actions: add, delete, update then the state will be very different from the initial state. Mutating the state causes side effects that can cause errors. That's why it's a good idea to use a library to help us with data immutability.