Re:Pros and Cons of using immutability with React.js
by wereHamster on Friday August 14, 2015 @12:01PM
(#10060861)
Object.assign does not work well when you have classes. For one of my projects I came up with a small helper to clone class instances: https://caurea.org/2015/07/19/generic-immutable-objects-in-j.... In addition to cloning, it freezes the new object so accidental attempts to mutate it will throw an exception (in strict code).
[ Parent
| on HN ]
There are no comments on this comment yet.