Closed marceloavf closed 7 years ago
Oops! There is an error in the documentation. I confound the comments for mutationSuccessFn
and mutationFailureFn
.
The method signature looks like function (state, payload)
, so state
is the store state andpayload
is the response from your API.
I've updated the README.
Is there a way to do it ? Or I need to do this inside another action/mutation?
mutationSuccessFn: (state, payload) => {
this.state = this.state.concat(payload.data);
},
I found it, was an error with the spelling and concat a first null state.
Thank you.
Glad you found the error. :)
I'm trying to change a mutation that createStore has done, I found in the docs that this could execute someting when it success:
But my problem is that I need to concat this state with the old one, is that possible?
Thanks!