Closed 0x4d6165 closed 8 years ago
I realize that a feature that would allow this sort of nested mutation might go against the philosophy of this module, but I thought I'd suggest it anyway :smile:.
As you predicted, I'm not open to introducing mutations. 😉 Appreciate the thoughtful post though!
I'm trying to use seamless-immutable as my data option in redux and I'm trying to add a demo "add-post" action which would push a new post into the post array which is within the state object (also an immutable object created with
const initialState = Immutable({ posts: [], post: {} });
. Using the following, which I would assume would work:, causes an error. I could do something like this:
but I was hoping for a more elegant, functional programming-y solution 😝. However, I realize that a feature that would allow this sort of nested mutation might go against the philosophy of this module, but I thought I'd suggest it anyway :smile:.