I know using "produce" will not change old data in state (only update modified properties) , maybe this will help redux detect the change more fast and accurate, can redux take advantage of this?
No, because when using plain reducers properly you should be doing the same; recycling unchanged data.
The sole exception where immer might be beneficial performance wise is where you assign the same value(s) to the same propertie(s), which would'nt create a new object with Immer, but it would when writing reducers the idiomatic way.
Thanks for the answer.
Most helpful comment
No, because when using plain reducers properly you should be doing the same; recycling unchanged data.
The sole exception where immer might be beneficial performance wise is where you assign the same value(s) to the same propertie(s), which would'nt create a new object with Immer, but it would when writing reducers the idiomatic way.