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

Stories not displaying in the web browser- react-native #3353

Closed
bacancy-swaroopa opened this issue Apr 4, 2018 · 8 comments
Closed

Stories not displaying in the web browser- react-native #3353

bacancy-swaroopa opened this issue Apr 4, 2018 · 8 comments

Comments

@bacancy-swaroopa
Copy link

If you are reporting a bug or requesting support, start here:

Bug or support request summary

I created the stories and when running on browser then when I click on the any story
the stories were not displaying in the right pane of the browser
Actually they should display respective stories.

Steps to reproduce

I installed the storbook and run npm run storybook

Here is the screen shot:

screen shot 2018-04-04 at 11 53 52 am

Actually commentView story is selected but there is nothing displaye din the right pane

tis is what I have in package.json file

"@storybook/addon-storyshots": "^3.2.3",
"@storybook/react-native": "^3.3.15",
"@storybook/addon-actions": "^3.3.15",
"@storybook/addon-links": "^3.3.15",
"@storybook/addons": "^3.3.15"

In app it is working fine but when coming to browser it is not displaying

@igor-dv
Copy link
Member

igor-dv commented Apr 4, 2018

React native stories can't be shown in the browser with an out-of-the-box use case - because they are react-native. As you can see in the first Welcome to storybook screen or in the Readme, you should perform more steps to see them on the device.

If you do want to see them in the browser, you may set up the react-native-web. But you should understand that it won't be real native stories.

P.S. Note for the team: we should probably add some big red explicit description to the welcome screen and to the docs, so people won't get confused.

@danielduan
Copy link
Member

I personally think the web UI is of little value to most developers. We should just default to device UI only - #3278

@joegoodall1
Copy link

Quick question:

I've got everything up and running for React Native but was wondering if it was possible to have 2 simulators open at the same time, one with the storybook UI and one with the app being developed UI?

If this isn't possible, does it mean I have to shut down the packager to switch between seeing my app and storybook on the simulator?

@danielduan
Copy link
Member

@joegoodall1 you'll need to run two different packagers, one with the storybook script and the other with whatever you use to bundle your app

@joegoodall1
Copy link

Thanks for replying so quickly @danielduan.

Can you give me some pointers on how to implement this? Is there a link to an example that is set up and working?

I did try the link here to use the haul packager but that was unsuccessful in running Storybook and our app at the same time.

@danielduan
Copy link
Member

the long version: RN or Haul can't watch the same directory without some weird configurations. the easiest way to accomplish this is to separate your shared components into a separate package, installed or symlinked between two different projects and folder structures. you could try running one in Haul and the other with RN packager and trying different configurations as well.

the easiest way is to just run them both in the same app with one bundler, with the main app providing an entry point into storybook via a button or link of some sort.

@stale
Copy link

stale bot commented Apr 28, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Apr 28, 2018
@stale
Copy link

stale bot commented May 28, 2018

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

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

4 participants