Skip to content

Instantly share code, notes, and snippets.

@itelo
Created May 7, 2020 04:01
Show Gist options
  • Save itelo/00ec890d36690b36e939d7fbd4b771c3 to your computer and use it in GitHub Desktop.
Save itelo/00ec890d36690b36e939d7fbd4b771c3 to your computer and use it in GitHub Desktop.
import {AppRegistry} from 'react-native';
import {getStorybookUI, configure} from '@storybook/react-native';
import {loadStories} from './storyLoader';
import './rn-addons';
// import stories
configure(() => {
loadStories();
}, module);
// Refer to https://github.com/storybookjs/storybook/tree/master/app/react-native#start-command-parameters
// To find allowed options for getStorybookUI
const StorybookUIRoot = getStorybookUI({});
// If you are using React Native vanilla and after installation you don't see your app name here, write it manually.
// If you use Expo you can safely remove this line.
AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);
export default StorybookUIRoot;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment