Skip to content

Instantly share code, notes, and snippets.

@rwaddin
Created October 27, 2022 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwaddin/37a287a93b4eca4c20a2a78a977353b4 to your computer and use it in GitHub Desktop.
Save rwaddin/37a287a93b4eca4c20a2a78a977353b4 to your computer and use it in GitHub Desktop.
Vue3 Composition Api watch store value
export default {
state: {
_epochtime: null
},
getters: {
fetchEpoch: (state) => state._epochtime
},
actions: {
},
mutations: {
PUT_EPOCH(state, params){
state._epochtime = Date.now();
}
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment