Skip to content

Commit 05880be

Browse files
authored
Update 04.md
1 parent e2a8a47 commit 05880be

File tree

1 file changed

+15
-3
lines changed
  • challenges/ecosystem

1 file changed

+15
-3
lines changed

challenges/ecosystem/04.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,23 @@ npx sb@latest init --type react_native
2121

2222
**🔭 Hint:** Read the prompt, the setup is NOT 100% automated.
2323

24+
To run Storybook, you will need to:
25+
26+
First create metro config file if you don't have it yet.
27+
2428
```console
25-
? We were not able to detect the right builder for your project. Please select one: ›
26-
// answer Webpack
29+
npx expo customize metro.config.js
30+
```
31+
Enable transformer.unstable_allowRequireContext in your metro config
32+
33+
```js
34+
config.transformer.unstable_allowRequireContext = true;
2735
```
2836

37+
For a more detailed guide go to:
38+
39+
https://github.com/storybookjs/react-native#existing-project
40+
2941
### Render Storybook
3042

3143
![Change App.tsx for Storybook in React Native](https://raw.githubusercontent.com/flexbox/react-native-workshop/main/challenges/ecosystem/storybook-booting.png)
@@ -68,7 +80,7 @@ Right now, storybook display components created for testing purposes. We want to
6880
rm -rf .storybook/stories/
6981
```
7082

71-
- [ ] Update `.storybook/main.js` file to load stories from our components folder:
83+
- [ ] Update `.storybook/main.ts` file to load stories from our components folder:
7284

7385
```diff
7486
module.exports = {

0 commit comments

Comments
 (0)