4 ms·
The readme explains in more detail: https://github.com/unadlib/mutative#readme https://github.com/unadlib/mutative#readme > Immer must have auto-freeze enabled
by Leftium 3y ago
The readme explains in more detail: https://github.com/unadlib/mutative#readme https://github.com/unadlib/mutative#readme
> Immer must have auto-freeze enabled by default(Performance will be worse if auto-freeze is disabled), such immutable state with Immer is not common. In scenarios such as cross-processing, remote data transfer, etc., we have to constantly freeze these immutable data.
> There are more parts that could be improved, such as better type inference, non-intrusive markup, support for more types of immutability, Safer immutability, more edge cases, and so on.
Also compared to native spread operation(naive handcrafted reducer):
> The spread operation has performance pitfalls...
> And Mutative optimization focus on shallow copy optimization, more complete lazy drafts, finalization process optimization, and more.