Skip to content

Edit "comit" after editing a function #325

Answered by bra1n
MRegnard asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, VueX mutators (which are called with commit) can only take one argument, so if you want to pass more than just players to addHistory, you have to pass it as an object or array, like you did in your socket.js.
addHistory(state, { players, nbVotes }) for example, which would require the parameter to always be an object.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MRegnard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants