Replies: 4 comments 6 replies
-
|
Have you found a solution for this? I'd like to use Storybook and expo router as well. |
Beta Was this translation helpful? Give feedback.
-
|
not sure what's the best way to go but since i was in a monorepo, i just created a storybook app next to my expo app using expo-router. |
Beta Was this translation helpful? Give feedback.
-
|
@wcastand This really should be mentioned in the router documentation but there is a note in the monorepo docs here: https://docs.expo.dev/guides/monorepos/#change-default-entrypoint Which can also be set inside your |
Beta Was this translation helpful? Give feedback.
-
|
I merge in the "custom directory" config to load the storybook app based on the env flag. // app.config.json
[
'expo-router',
{
...(process.env.STORYBOOK_ENABLED ? { root: './src/storybook-app' } : undefined),
}
],// src/storybook-app/index.ts
import StorybookUIRoot from '../../.storybook';
export default StorybookUIRoot; |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The canonic way that Storybook docs recommend setting up the app is:
This doesn't really mix well with
import 'expo-router/entry'(which doesn't seem to like being dynamically imported?). Is there a recommended way to optionally runexpo-router?Beta Was this translation helpful? Give feedback.
All reactions