Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active June 27, 2022 04:22
Show Gist options
  • Save cp-sumi-k/05e326c5703012ba7bcbb7249dfa91d6 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/05e326c5703012ba7bcbb7249dfa91d6 to your computer and use it in GitHub Desktop.
/*
vuex store getters
*/
const getters = {
jobs: (state) => state.jobs,
jobById: (state) => state.jobById,
jobsError: (state) => state.jobsError,
}
/*
pinia store getters
We don't need any computed getters in the website, so it has been completely removed in our case.
But here is example of pinia getters
*/
const getters = {
fullname: (state) => state.firstname + state.lastname,
greetings() {
return "Hello " + this.fullname
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment