4 ms·
Have you looked at Immer.js? It allows you to express modifications to immutable objects as a series of imperative operations. In my experience most "immutabil
by underwater 7y ago
Have you looked at Immer.js? It allows you to express modifications to immutable objects as a series of imperative operations.
In my experience most "immutability" in JS is enforced by convention or, at best, static type systems. It's not ideal, but it works.
- dvlsg 7y agoLenses in ramda work well, too, if you don't mind being functional in your js code. I suppose that still only fits in the "immutable by convention" category, though.