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/4ff6c47c35ac0ec589426876d2bbac32 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/4ff6c47c35ac0ec589426876d2bbac32 to your computer and use it in GitHub Desktop.
/* 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