Skip to main content

๐Ÿงฉ Integration

Requirementsโ€‹

To use Sherlo, ensure the following packages are installed:

Dependenciesโ€‹

To install Sherlo, run:

Terminal
npm install -D @sherlo/react-native-storybook
Native Modules

If your project has iOS native code, run:

  1. cd ios - to navigate to the folder
  2. pod install - to install the iOS dependencies

Storybook Componentโ€‹

To enable Sherlo to navigate through stories, update the Storybook component

info

Storybook component is typically exported from .rnstorybook or .storybook at project root

.rnstorybook / index.js
import AsyncStorage from "@react-native-async-storage/async-storage";
import { getStorybook } from "@sherlo/react-native-storybook";
import { view } from "./storybook.requires";

const Storybook = view.getStorybookUI({
const Storybook = getStorybook(view, {
storage: {
getItem: AsyncStorage.getItem,
setItem: AsyncStorage.setItem,
},
});

export default Storybook;

Storybook Accessโ€‹

To enable Sherlo to access Storybook, choose one of these options:

Provide a build that opens straight into Storybook

No app, no menu โ€” Storybook only