In this article I will talk about the story of why Cerebral went from using immutability and then later decided to drop it.
So lets first align our thoughts on what immutability is. JavaScript has no concept of immutability. Any object or array is passed around the code by reference and you can mutate them wherever you want. That means any objects or arrays you create and pass around will look the same in any part of your code, because it is the same object/array.
With immutability you can still pass objects and arrays around your code by reference, but when you make a change to them you will always create a new object or array.