I agree with your assessment of immer. Lack of composability is a deal breaker for larger projects.
Interestingly plain old Javascript objects are inherently immutable if you use them with functional lenses or with a mechanism that creates a shallow copy of the path you edit a node on.
I 100% agree with you. In my own projects I always default to plain old JS objects.
I forgot to mention that utility libraries like Ramda and lodash/fp always work in an immutable way. So if something is cumbersome to write in native JS, it's a good idea to check out what does libraries offer. :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I agree with your assessment of immer. Lack of composability is a deal breaker for larger projects.
Interestingly plain old Javascript objects are inherently immutable if you use them with functional lenses or with a mechanism that creates a shallow copy of the path you edit a node on.
Thanks for the comment!
I 100% agree with you. In my own projects I always default to plain old JS objects.
I forgot to mention that utility libraries like Ramda and lodash/fp always work in an immutable way. So if something is cumbersome to write in native JS, it's a good idea to check out what does libraries offer. :)