Last active
June 27, 2022 04:22
-
-
Save cp-sumi-k/4ff6c47c35ac0ec589426876d2bbac32 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 state | |
To access it, we need getters like, store.getters.jobs | |
*/ | |
const state = { | |
jobs: null, | |
jobById: null, | |
jobsError: null, | |
}; | |
/* | |
pinia store state | |
We have now indivdual files for apis, items can be considered as jobs | |
We can access state directly as store.items | |
*/ | |
const state = () => { | |
return { | |
items: null, | |
error: null, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment