Skip to content

Conversation

@estacet
Copy link

@estacet estacet commented Apr 21, 2021

No description provided.

@cuebit
Copy link
Member

cuebit commented Apr 21, 2021

Thanks for the PR. I think this is lay terms for what already exists. For example, read the following excerpt from the Action docs. Could I therefore ask what your interpretation of this is and whether this just duplicates what's already stated?

Actions support the same payload format and object-style dispatch

// dispatch with a payload
store.dispatch('incrementAsync', {
  amount: 10
})

// dispatch with an object
store.dispatch({
  type: 'incrementAsync',
  amount: 10
})

@kiaking
Copy link
Member

kiaking commented May 20, 2021

Yeah, I think this addition is a little too much? But I do understand sometime people gets confused, or not sure how to pass multiple argument. So how about we add a note at here, stating that a 3rd argument will be ignored and if you want pass multiple arguments, users should pass an object or arrays.

We should do the same for mutations though.

@kiaking kiaking added the documentation Improvements or additions to documentation label May 20, 2021
@zkriszti
Copy link

zkriszti commented Feb 2, 2022

Explicitly stating that only one argument is accepted as a payload would especially help those who are explicitly looking for information at the Actions section of the docs (that is, using it as a reference, not reading the sections in order).
It may also help developers who use English as their second language, and it would also make the docs more approachable for beginners.

@cuebit cuebit deleted the branch vuejs:3.x April 13, 2022 03:12
@cuebit cuebit closed this Apr 13, 2022
@cuebit cuebit reopened this Apr 13, 2022
@estacet estacet closed this Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants