Created
October 27, 2022 04:01
-
-
Save rwaddin/37a287a93b4eca4c20a2a78a977353b4 to your computer and use it in GitHub Desktop.
Vue3 Composition Api watch store value
This file contains 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
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