I am not sure if this is a bug in vue-router or in storybook. So I kindly would like to ask if this is a bug. I use vue 2.7 and completely composition api with vue-router/composable. When I use the composable useRouter() inside the component it works fine. But when I create a story for the component, storybook crashes and says TypeError: root.$router is undefined. Is there something I missed to configure or is this a bug?
What is expected?
const router = useRouter();
should normally work in story and component
What is actually happening?
const router = useRouter();
works in component, crashes story
It would be very nice if you can help me with that or if I need to configure something :)
Version
3.6.5
Reproduction link
codesandbox.io
Steps to reproduce
I am not sure if this is a bug in vue-router or in storybook. So I kindly would like to ask if this is a bug. I use vue 2.7 and completely composition api with vue-router/composable. When I use the composable useRouter() inside the component it works fine. But when I create a story for the component, storybook crashes and says TypeError: root.$router is undefined. Is there something I missed to configure or is this a bug?
What is expected?
const router = useRouter();
should normally work in story and component
What is actually happening?
const router = useRouter();
works in component, crashes story
It would be very nice if you can help me with that or if I need to configure something :)