Passing data to a Mutation
tyshantprince opened this issue · comments
Tyshan Prince commented
I am trying to send data from the UI back to the store and use it in a Mutation, is that possible?
Nathan commented
I would also like to know that
Nathan commented
Don't know if this is the best way @tyshantprince , but you could do it like this:
class AddItem extends VxMutation<MainStore> {
Item item;
AddItem(this.item);
@override
perform() => {
store?.items.add(item),
};
}
Pawan Kumar commented
Yes you can do this