Skip to content

Using Vue3, Pinia and Vue-Router Pluging and resolving this.router typescript errors #2170

Discussion options

You must be logged in to vote

There is no this in Composition API. What you could do is uncomment the const router = useRouter(); and just call router.push({ name: 'login' }); But I imagine you need to define the router state property in a plugin?

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@leochen-g
Comment options

@scott-davidjones
Comment options

Answer selected by scott-davidjones
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants