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

storybook-react-native + react-native-web #2963

Closed
soyjavi opened this issue Feb 12, 2018 · 4 comments
Closed

storybook-react-native + react-native-web #2963

soyjavi opened this issue Feb 12, 2018 · 4 comments

Comments

@soyjavi
Copy link

soyjavi commented Feb 12, 2018

Issue details

If I use a basic native component everything works great. But I'm trying to use storybook with react-native & react-native-web and I always get:

can't find variable: document

Steps to reproduce

Just try to create an story for a react-native-web and run storybook-react-native ... zero-issues when I'm running the same story in storybook-react.

Please specify which version of Storybook and optionally any affected addons that you're running

    "@storybook/react": "^3.3.12",
    "@storybook/react-native": "^3.3.12",

Screenshots / Screencast / Code Snippets (Optional)

screen shot 2018-02-12 at 16 41 24

@Hypnosphi
Copy link
Member

Isn't react native web supposed to run in a browser? You probably need to use @storybook/react for web–targeted components

@soyjavi
Copy link
Author

soyjavi commented Mar 14, 2018

React-native-web runs in both environments web and native :)

@Hypnosphi
Copy link
Member

Their official storybook example uses @storybook/react though:

https://github.com/necolas/react-native-web/blob/0.5.1/website/package.json

@danielduan
Copy link
Member

danielduan commented Mar 23, 2018

"React Native for Web" brings the platform-agnostic Components and APIs of React Native to the Web.

https://github.com/necolas/react-native-web
Pretty sure it's not supposed to be for RN or else it wouldn't be calling document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants