Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Return values from mutation commits. #1437
What problem does this feature solve?
One often wants to get the id of a created object back from the data store. Much like in a database, if you add an object to an array in the store, you want to get it's id so that you can reference it again. When looking up how to do this, I found that you cannot, and I also found that someone else had the exact same inquiry on stackoverflow: https://stackoverflow.com/questions/42404925/return-value-from-vuex-mutation-id-for-newly-created-object#42406872
What does the proposed API look like?