Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

How to use with react-native? #83

Closed
hadfieldn opened this issue Jan 3, 2017 · 8 comments
Closed

How to use with react-native? #83

hadfieldn opened this issue Jan 3, 2017 · 8 comments

Comments

@hadfieldn
Copy link

It looks like others have had success getting knobs to work with react-native storybook, but when I include import '@kadira/storybook-addon-knobs/register'; in my addons.js file I get the error document is not defined -- due to a dependency on insert-css, which requires document.

Is there another way to register the addon that works with react native?

@arunoda
Copy link
Contributor

arunoda commented Jan 5, 2017

It's works for me without any issues.

@ndbroadbent
Copy link

Also if you interested in using this in the browser instead of on your device, you should check out react-native-web. It can be tricky to set up, but it's working very well for me.

@xareelee
Copy link

Hi @ndbroadbent

How to set up react-native-web to develop React Native components with storybook on a browser?

@Gongreg
Copy link

Gongreg commented Mar 23, 2017

Hey, You can try to look into https://github.com/wix/react-native-storybook-example . It has knobs running in react-native.

@blechatellier
Copy link

@hadfieldn did you manage to get it running? I'm stuck as well on the same error when building.

@sowdri
Copy link

sowdri commented Jun 23, 2017

I'm struck here as well. Obviously there is a dependency on the 'document' which is missing in the react-native environment. Any workarounds/fixes?

@shilman
Copy link
Contributor

shilman commented Jun 23, 2017

@pastawoua @sowdri please see storybookjs/storybook#803

This repository is deprecated.

@shilman shilman closed this as completed Jun 23, 2017
@sowdri
Copy link

sowdri commented Jun 23, 2017

@shilman Thank you for the info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants