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

docs: Fixes #247 by editing the v6 alpha guide with instructions on how to set up with Expo #250

Merged
merged 2 commits into from
Aug 15, 2021

Conversation

lauriharpf
Copy link
Contributor

@lauriharpf lauriharpf commented Aug 10, 2021

Also fixes linter warning in README.md.

Issue: #247

What I did

Slightly modified the v6 alpha guide so that 6.0 alpha can also be set up on Expo. Notice that there still seem to be some issues with Expo (e.g. the React Native hooks, see #247 (comment))

How to test

Test the modified v6 alpha guide to ensure that it is understandable & produces a working setup on Expo (and on vanilla React Native, if the user so chooses).

  • Does this need a new example in examples/native? no, not in my opinion, but we could consider adding an example Expo project to the repo alongside the vanilla React Native project?
  • Does this need an update to the documentation? included

…ctions on how to set up with Expo.

Also fixes linter warning in README.md.
Copy link
Member

@dannyhw dannyhw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

v6README.md Outdated
```shell
npm install --global expo-cli
expo init appName
# select blank TypeScript template when prompted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can specify the template with --template I think

v6README.md Outdated

Update your metro config to have `resolver:{resolverMainFields: ['sbmodern', 'main']}`.
This enables us to use the modern build of storybook instead of the polyfilled versions
For React Native without Expo, update your metro config to have `resolver:{resolverMainFields: ['sbmodern', 'main']}`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolver main fields is what fixes the promises bug. The issue with expo is more that we need to extend the default config instead of replacing resolver main fields we can just add sbmodern like default.resolver.resolverMainfields = ['sbmodern', ...default.resolver.resolverMainfields ]

See the expo docs on metro configs and you'll see what I mean.

@dannyhw dannyhw merged commit afffbff into storybookjs:next-6.0 Aug 15, 2021
@lauriharpf lauriharpf deleted the docs/update-v6-alpha-guide branch August 15, 2021 18:25
dannyhw pushed a commit to raychanks/react-native that referenced this pull request Feb 7, 2022
…ctions on how to set up with Expo (storybookjs#250)

* docs: Fixes storybookjs#247 by editing the v6 alpha guide with instructions on how to set up with Expo.

Also fixes linter warning in README.md.

* docs: Updated the V6 Alpha readme with the Expo metro config as discussed in storybookjs#247 (comment)
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.

None yet

2 participants