Last active
June 27, 2022 04:22
-
-
Save cp-sumi-k/05e326c5703012ba7bcbb7249dfa91d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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