You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.
Hello, I was trying to update a sublist of a List, but I've not found a proper way to do this (using only one method).
Example : I have an Immutable cart with products and each products have a category and a price :
But with that, I only return products and not cart, so I have to merge... And sometimes I'm returning product without changes because it does not match my condition, it's not bad but not perfect right ?
From @lpeliberty on Tue, 26 Nov 2019 08:20:07 GMT
What happened
Hello, I was trying to update a sublist of a List, but I've not found a proper way to do this (using only one method).
Example : I have an Immutable cart with products and each products have a category and a price :
If I want to return the whole cart, and update only product where category is
category1
, I can do a map + update, a filter + merge like :But with that, I only return products and not cart, so I have to merge... And sometimes I'm returning product without changes because it does not match my condition, it's not bad but not perfect right ?
Or with a updateInWhere for more complexe objects, It would be awesome for applications like react-redux (my use case).
Is it a bad idea ? Did I missed something in immutableJS docs that can do it ?
Thx to read.
Copied from original issue: immutable-js#1752
The text was updated successfully, but these errors were encountered: