-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more immutability helpers. #1856
Comments
Personally, I run with much simplified helper instead, that only supports the equivalent of Something like: (
|
How immutate implementation looks like? |
https://gist.github.com/syranide/d75f32ebad237112d324
I've also thought about getting rid of the redundancy when mutating by providing a second argument to the callback, that could look like: PS. As always, use at your own risk :) |
Well I still would love to have more complete helpers in react. If I need rich api for immutable data operations I can of course adopt Underscore for that or integrate Mori in to react. Question then is why you need helpers in react if they are incomplete? |
|
@spicyj Oooh, very interesting use of the spread operator (or whatever it is called). |
For removing element from array I can use $splice, but how I could remove property from object using immutable helpers? Just want to remove particular key. |
@Gonzih: immutable-js is a fully featured immutable collection library that provides the helpers you want and more. Since @petehunt can we close this now? |
As far as I know the current thinking is that |
Hello, I like Idea of immutability helpers in react, but I find them incomplete. I still from time to time switch to Underscore for complex operations on data. Does it make sense to add more helpers like:
What do you think guys? Thanks.
The text was updated successfully, but these errors were encountered: