Skip to content

Commit

Permalink
Merge pull request #4780 from niku/patch-1
Browse files Browse the repository at this point in the history
Revise the sample in README for ReactNative
  • Loading branch information
Gongreg committed Nov 23, 2018
2 parents 4bd15a8 + c8898a1 commit 086e4a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/pages/basics/guide-react-native/index.md
Expand Up @@ -73,7 +73,7 @@ import '@storybook/addon-ondevice-notes/register';
The easiest solution is to replace your app entry with:

```js
import './storybook';
export default from './storybook';
```

If you cannot replace your entry point just make sure that the component exported from `./storybook` is displayed
Expand All @@ -86,6 +86,7 @@ RN application, e.g. on a tab or within an admin screen.
Now you can write some stories inside the `storybook/stories/index.js` file, like this:

```js
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import { View, Text } from 'react-native';

Expand All @@ -102,7 +103,7 @@ const CenteredView = ({ children }) => (
</View>
);

storiesOf('CenteredView')
storiesOf('CenteredView', module)
.add('default view', () => (
<CenteredView>
<Text>Hello Storybook</Text>
Expand Down

0 comments on commit 086e4a9

Please sign in to comment.