How to pass props to usePage function from Storybook ? #1365
Unanswered
wadakatu
asked this question in
Help (Vue)
Replies: 1 comment
-
The issue is that the usePage() is not available from within storybook, because it is something that is passed to the application when a view is loaded through your backend provider (Laravel maybe?) I haven't found a good way to mock this yet in storybook though |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version
@inertiajs/[email protected]
@inertiajs/[email protected]
Hi.
I am trying to create the story of a component which uses usePage function to retrieve a value called
menu
.This is how I use usePage function to retrieve values in vue component.
My story looks like this.
However, the error
TypeError: Cannot read properties of undefined (reading 'menu')
occurs no matter how I implemented.Is there anyone who knows how to pass props to usePage function from storybook?
Beta Was this translation helpful? Give feedback.
All reactions