4 ms·
I quite like this approach, but haven't had a chance to try it in production yet. It seems to be performant and convenient, the biggest cost being extra bytes.
by kn8 8y ago
I quite like this approach, but haven't had a chance to try it in production yet. It seems to be performant and convenient, the biggest cost being extra bytes.
In general, immer plugs in nicely to a lot of contexts, such as redux. Here's another example of how it works with tiny-atom: https://qubitproducts.github.io/tiny-atom/using-with-immer https://qubitproducts.github.io/tiny-atom/using-with-immer (disclaimer: yet another state management lib, which I wrote).
An alternative approach to immer I've been using in production is http://zaphod.surge.sh/ http://zaphod.surge.sh/, which is more like an immutable lodash.