gaearon / ama

Ask me anything!
222 stars 5 forks source link

Why Redux use Immutable Data Structure? #107

Closed ap13p closed 8 years ago

ap13p commented 8 years ago

Why Redux use immutable data structure. I mean, immutable mean creating a new object for an update right? In my case, my reducer state is just a plain array, but the size is already 1000+. And when it come to updating the data, it's a bit slower. Is there any recommendation for this big array data? :)

pavanmehta91 commented 6 years ago

Normalization maybe

vitkarpov commented 6 years ago

As I get it, immutability is just a handy feature for debugging. You may set up your dev environment with it and suppress it in a production build, as long as you don't need debugging data from real users at runtime.