How to use Storybook with Inertia.js and React? #27087
Unanswered
MichaelNZ85
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm using Storybook in a fullstack app using Laravel Breeze, Inertia.js and React. Storybook works fine except for components that use functions from Inertia. For example, this component uses the
usePage
hook, which enables it to access components passed to the page (a parent React component) from the Laravel backend with Inertia:Trying to access it on Storybook leads to this error:
Additional information
.storybook/main.ts
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions