How to navigate inside pinia store?
After I received my token from the backend I want to navigate the user to
/
, unfortunately navigateTo("/")
doesnt work
5 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Hello thanks for your answer, this doesn't work tho, even typescript gives an error:
Solution: https://pinia.vuejs.org/core-concepts/plugins.html#adding-new-external-properties
plugin file looks like this:
Pinia 🍍
Intuitive, type safe, light and flexible Store for Vue
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
After implementing the solution I posted above, you can call
this.router.push('/')
inside your actions of your store