An open API service indexing awesome lists of open source software.

https://github.com/guyzmo/mcve-rnw-sb6

MCVE for Expo/RNW with SB6
https://github.com/guyzmo/mcve-rnw-sb6

Last synced: over 1 year ago
JSON representation

MCVE for Expo/RNW with SB6

Awesome Lists containing this project

README

          

# Expo with Storybook 6 running RNW stories

This MCVE runs storybook 6 with RNW stories, thanks to a hack within the main.ts that replaces all calls to RN by calls to RNW.

## Run the code

To setup:

```
yarn
```

To launch storybook

```
yarn storybook
```

To run expo

```
yarn expo
```

## Issue

Whenever I try to load an external library (like react-native-eva-icons), I get an error such as the following one, featured in this repository:

```
Unexpected error while loading ./components/Button/Button.stories.tsx: ReferenceError: react is not defined
```

The issue is caused by the `import { Button } from "./Button"` import in the story, which itself is caused by the
`import { Icon } from "react-native-eva-icons";` import in `Button.tsx`.