How to use router.push in pinia? #1332
Answered
by
MisakaTAT
MisakaTAT
asked this question in
Help and Questions
-
My code like this, router.push is not working, but not found any errors. export const useUserStore = defineStore('user', () => {
const logout = () => {
window.localStorage.removeItem(TOKEN);
router.push({ name: 'Login' });
};
}); |
Beta Was this translation helpful? Give feedback.
Answered by
MisakaTAT
Jun 2, 2022
Replies: 1 comment
-
resolved |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MisakaTAT
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
resolved