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

React Native - Unable to change story via browser #7873

Closed
tedcurrent opened this issue Aug 27, 2019 · 4 comments
Closed

React Native - Unable to change story via browser #7873

tedcurrent opened this issue Aug 27, 2019 · 4 comments

Comments

@tedcurrent
Copy link

tedcurrent commented Aug 27, 2019

Describe the bug
The "in app" Storybook navigator works just fine, but with browser, when changing the story, the app screen goes blank with Please open the Storybook UI... text. Updated from Storybook 4 to 5. See details and screenshots below.

To Reproduce
Steps to reproduce the behavior:

  1. react-native run-ios --scheme 'Storybook' (start simulator and set storybook env)
  2. start-storybook
  3. See initial story in app, all good.
  4. Go to http://localhost:7007
  5. Change story
  6. App is blank (there MIGHT be a small flicker of the story changed to)

Expected behavior
Should be able to change stories.

Screenshots
Initial view (all good)
Screenshot 2019-08-27 10 20 40

After changing story (broken)
Screenshot 2019-08-27 10 20 56
Code snippets
storybook/index.js

import React, { Component } from 'react'
import { AppRegistry, View } from 'react-native'
import { getStorybookUI, configure } from '@storybook/react-native'

// import stories
configure(() => {
  require('./stories')
}, module)

const StorybookUIRoot = getStorybookUI({ port: 7007, onDeviceUI: false })

class StorybookUIHMRRoot extends Component {
  render() {
    return (
      <View style={{ backgroundColor: 'white', flex: 1 }}>
        <StorybookUIRoot />
      </View>
    )
  }
}

AppRegistry.registerComponent('AppName', () => StorybookUIHMRRoot)
export default StorybookUIHMRRoot

index.ios.js

import Config from 'react-native-config'

import 'app/App'

if (Config.STORYBOOK_ENABLED === 'true') {
  require('./storybook')
}

System:

System:
    OS: macOS 10.14.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.17.3 - ~/.yarn/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 76.0.3809.100
    Firefox: 62.0.2
    Safari: 12.1
  npmPackages:
    @storybook/addon-actions: ^5.1.11 => 5.1.9 
    @storybook/addon-links: ^5.1.11 => 5.1.9 
    @storybook/react-native: ^5.1.11 => 5.1.9 
    @storybook/react-native-server: ^5.1.11 => 5.1.9 
    @storybook/theming: ^5.1.11 => 5.1.9 

Additional context
Everything worked on "@storybook/react-native": "^4.1.18"
After updating to "@storybook/react-native": "^5.1.11" it broke

@shilman
Copy link
Member

shilman commented Aug 27, 2019

Closing as duplicate to #7723

@tedcurrent
Copy link
Author

@shilman thanks for responding so fast! I don't see how this is a duplicate, but these issues may be related I guess. I'm not even sure if this is a similar issue to #7723 as we don't have any issues with the web browser, just the app showing the storybook "Please" overlay when trying to interact with it via browser.

@stale
Copy link

stale bot commented Sep 18, 2019

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 Sep 18, 2019
@stale
Copy link

stale bot commented Oct 18, 2019

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!

@stale stale bot closed this as completed Oct 18, 2019
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

2 participants