diff --git a/app/react-native/src/manager/components/PreviewHelp.js b/app/react-native/src/manager/components/PreviewHelp.js index eb7b581c711e..be3822695969 100644 --- a/app/react-native/src/manager/components/PreviewHelp.js +++ b/app/react-native/src/manager/components/PreviewHelp.js @@ -52,7 +52,7 @@ const PreviewHelp = () => For react-native init apps:

-
npm run <platform>
+
react-native run-<platform>
; diff --git a/app/react-native/src/preview/components/StoryListView/index.js b/app/react-native/src/preview/components/StoryListView/index.js index d59632d7d7a3..b8a0bb179b9e 100644 --- a/app/react-native/src/preview/components/StoryListView/index.js +++ b/app/react-native/src/preview/components/StoryListView/index.js @@ -46,6 +46,11 @@ export default class StoryListView extends Component { componentDidMount() { this.handleStoryAdded(); + const dump = this.props.stories.dumpStoryBook(); + const nonEmptyKind = dump.find(kind => kind.stories.length > 0); + if (nonEmptyKind) { + this.changeStory(nonEmptyKind.kind, nonEmptyKind.stories[0]); + } } componentWillUnmount() { diff --git a/examples/react-native-vanilla/storybook/storybook.js b/examples/react-native-vanilla/storybook/storybook.js index 13d2735c4df0..f9f44af13664 100644 --- a/examples/react-native-vanilla/storybook/storybook.js +++ b/examples/react-native-vanilla/storybook/storybook.js @@ -8,7 +8,12 @@ configure(() => { require('./stories'); }, module); -const StorybookUI = getStorybookUI({ port: 7007, host: 'localhost', onDeviceUI: true }); +const StorybookUI = getStorybookUI({ + port: 7007, + host: 'localhost', + onDeviceUI: true, + resetStorybook: true, +}); setTimeout( () =>