Skip to content
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

Merged
merged 7 commits into from
Feb 13, 2024
Merged

add storybook with examples #106

merged 7 commits into from
Feb 13, 2024

Conversation

omar-bear
Copy link
Contributor

Description

Add storybook to start ui native #105

image

image

image

Copy link

github-actions bot commented Feb 12, 2024

🚀 Expo preview is ready!

  • Project → start-ui-native
  • Platform → ANDROID
  • Scheme → start-ui-native
  • Runtime Version → 1.1.0
  • More info

Learn more about 𝝠 Expo Github Action

package.json Outdated
Comment on lines 7 to 8
"disable-storybook": "cross-env STORYBOOK_ENABLED='false'",
"enable-storybook": "cross-env STORYBOOK_ENABLED='true'",
Copy link
Member

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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",
Copy link
Member

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 ?

Copy link
Contributor Author

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

@omar-bear omar-bear merged commit 109d88a into main Feb 13, 2024
1 check passed
@omar-bear omar-bear deleted the feat-add-storybook branch February 13, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants