[ad_1]
I am trying to get Storybook running on a react native app build by Expo. I generated my project with:
expo init storybook-test
I entered the folder and ran:
npx -p @storybook/cli sb init --type react_native
…which I got from this tutorial and it added multiple files and folders such as:
- Root
- - storybook
- - - stories
- - - addons.js
- - - index.js
- - - rn-addons.js
It then told me to:
add the following to your entrypoint (usually App.js or index.js).
export {default} from "./storybook";
I wasn’t sure what that means as storybook>index.js
already has a default export:
export default StorybookUIRoot;
I then edited my root/storybook/index.js
as there is no main.js
in my project to the following:
// if you use expo remove this line
// import { AppRegistry } from 'react-native';
import { getStorybookUI, configure, addDecorator } from '@storybook/react-native';
// import { withKnobs } from '@storybook/addon-knobs';
import './rn-addons';
// enables knobs for all stories
// addDecorator(withKnobs);
// import stories
configure(() => {
require('./stories');
}, module);
// Refer to https://github.com/storybookjs/react-native/tree/master/app/react-native#getstorybookui-options
// 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 should remove this line.
// AppRegistry.registerComponent('%APP_NAME%', () => StorybookUIRoot);
export default StorybookUIRoot;
After all this, I ran yarn storybook
and it opened the webpage but the stories never load.
What am I doing wrong?!
[ad_2]
Hemen Bilgi Alın. Yüksek Kalite ve Ekonomik Kompresör. İndirimi Kaçırmayın.
I love this app! A pleasant and enjoyable game tߋ play when you want tօ relax.
Beautiful graphics, soothing music ɑnd not toօ loudly calls ⲟf numbers.
The choice tⲟ play wіth games pieces, or to playing “free” іѕ
great аnd no matter һow yoս play, yoᥙ coupd bе rewarded wіth multiple sports betting numƄers in уour playing cards.
Ӏ reϲently һad tԝo cards I played during the
exact same match. both of thеm weге winners of
quadruple sports betting.