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

Immerjs is a very handy library for doing this kind of thing. It is a natural fit for react but can be used for any kind of copying like this.


+1 for immer. I love it.

If anyone here ends up using it, make sure you learn how it works first. There are performance implications. It may not matter but it's important to know what they are. Also it's generally best practice to learn how magical utilities like immer do what they do before using them!




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

Search: