question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

storybook RN server not refreshing stories

See original GitHub issue

Between 5.1.0-rc.4 and 5.1.3, Storybook RN server is no longer refreshing stories displayed on iOS simulator.

Steps to reproduce:

  1. Install @storybook/react-native-server": "5.1.3"
  2. Launch storybook RN server, navigate to localhost:7007 and click on any story
  3. iOS simulator shows Please open navigator and select a story to preview instead of displaying the selected story
  4. Open chrome console tab, the following error is shown:
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at sanitize (vendors~main.7825a50d99e16ac64ad5.bundle.js:21468)
    at Object.selectStory (vendors~main.7825a50d99e16ac64ad5.bundle.js:11623)
    at vendors~main.7825a50d99e16ac64ad5.bundle.js:9830
    at vendors~main.7825a50d99e16ac64ad5.bundle.js:14220
    at Array.forEach (<anonymous>)
    at Channel.handleEvent (vendors~main.7825a50d99e16ac64ad5.bundle.js:14219)
    at WebsocketTransport.handler (vendors~main.7825a50d99e16ac64ad5.bundle.js:14110)
    at WebSocket.socket.onmessage (vendors~main.7825a50d99e16ac64ad5.bundle.js:13986)

selected story loads correctly without the above error in @storybook/react-native-server": "5.1.0-rc.4", but fails with error in 5.1.0-rc.5 or 5.1.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
SerhiyZheliznjakcommented, Jun 14, 2019

Have the same issue in @storybook/react-native-server": “5.1.7” A workaround is to refresh chrome tab every time you choose new component

4reactions
alechpcommented, Jul 3, 2019

Confirmed it’s working.

For anyone wanting to save a few minutes on upgrading before testing, here’s a sample repo upgraded to 35a:

https://github.com/servexyz/rnes5-v2

Screen Shot 2019-07-03 at 11 10 31 AM
Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook does not refresh after save - Stack Overflow
I have created a Storybook and after when I change something and save it, the browser does not refresh automatically.
Read more >
Storybook for React Native tutorial - js
Storybook runs alongside your app in development mode. It helps you build UI components isolated from the business logic and context of your...
Read more >
@storybook/addon-ondevice-knobs | Yarn - Package Manager
Display storybook story knobs on your deviced. ... for React Native you can design and develop individual React Native components without running your...
Read more >
Setting up Storybook for React Native/TypeScript (server ...
The benefit of using Async Storage is so that when users refresh the app, Storybook can open their last visited story.
Read more >
@storybook/react-native - npm
OndeviceUI and React native Server. The react native storybook is designed to be flexible so that you can navigate all your stories and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found