Closed FezVrasta closed 8 years ago
I actually call this out in the documentation... seamless-immutable simply throws an error when you try to do a natively mutable function:
const array = Immutable(['foo']);
array.push('bar');
// ImmutableError is thrown
crio goes more the direction of ImmutableJS where the native mutable API is replaced with an immutable version:
const array = Immutable(['foo']);
const newArray = array.push('bar');
// newArray is now ['foo', 'bar']
This felt more natural to me, but also prevents the developer from figuring out how to actually do an immutable push on their own. Neither one is better or worse, just a different approach.
I see, thanks!
https://github.com/rtfeldman/seamless-immutable
They both look pretty similar, they both want to provide access to the native API of JS... What's the difference?