I open new react-native v0.49 project and install storybook with command
npm i -g @storybook/cli
then i open my project and run
getstorybook
I see storybook modules in my project
{
"name": "materialApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"storybook": "storybook start -p 7007"
},
"dependencies": {
"react": "16.0.0-beta.5",
"react-native": "0.49.3"
},
"devDependencies": {
"babel-jest": "21.2.0",
"babel-preset-react-native": "4.0.0",
"jest": "21.2.1",
"react-test-renderer": "16.0.0-beta.5",
"@storybook/react-native": "^3.2.13",
"@storybook/addon-actions": "^3.2.13",
"@storybook/addon-links": "^3.2.13",
"react-dom": "16.0.0-beta.5",
"prop-types": "^15.6.0"
},
"jest": {
"preset": "react-native"
}
}
when i run npm run storybook i see
then i connect the server to react-native app by
adb reverse tcp:7007 tcp:7007
and I run react-native app by
react-native run-android