-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add storybook with examples #106
Conversation
🚀 Expo preview is ready!
|
package.json
Outdated
"disable-storybook": "cross-env STORYBOOK_ENABLED='false'", | ||
"enable-storybook": "cross-env STORYBOOK_ENABLED='true'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks weird to me, why would we want to disable storybook ?
I think we always want to have STORYBOOK_ENABLE=true on development (so to prefix concerned scripts by STORYBOOK_ENABLED=true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this, the problem is that you can't run Storybook and the app simultaneously on the same port. Only if we are executing yarn storybook
on port 8081 will launch only Storybook, while on an other terminal execute yarn dev
on port 8082 will run just the app. but on two diffrent emulators The purpose of cross-env
is to specify which environment to use, allowing us to choose whether to start Storybook or the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we can do it in the same app (diffrent route) but the problem is on react native we have to reload many times the app to retest and it will be so innoying if click open menu show storybook on each test reload
@@ -4,15 +4,17 @@ | |||
"private": true, | |||
"main": "expo-router/entry", | |||
"scripts": { | |||
"start": "expo start", | |||
"start": "expo start -c", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need to clear the bundler cache at every start ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, otherwie sometimes it will not detect about the change of the env variable, i tested that and i fixed it by using -c
Description
Add storybook to start ui native #105