Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Lenses 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.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: