node4+ npm3+
npm i react-native-cli -g
npm i
npm start
react-native run-ios // ios
react-native run-android // android
- install dep
$ npm install antd-mobile --save
$ npm install babel-plugin-import --save-dev
- config
.babelrc
{"plugins": [["import", { "libraryName": "antd-mobile" }]]}
- Microsoft Code Push for dynamic update.
- Redux is a predictable state container for reading application, together with React Native.
- Redux-Saga is a library that aims to make side effects in reading application easier and better.
- react-navigation is an extensible yet easy-to-use navigation solution, can also be used across React and React Native projects allowing for a higher degree of shared code.
- Jest for testing React Native components and UT.
- Eslint is a tool for identifying and reporting on patterns found in reading application code.
- react-native-exceptions-manager for handling crashes in release version.
- init eslint
eslint --init
- Lint 检查 src/ 以及 更目录 .js文件
npm run lint
- format
npm run format
npm test
https://github.com/react-community/react-navigation
https://github.com/lwansbrough/react-native-camera
https://github.com/react-community/react-native-image-picker
https://github.com/jpush/jpush-react-native
npm run configureJPush <yourAppKey> <yourModuleName>
module name 指的是你 Android 项目中的模块名字(对 iOS 没有影响,不填写的话默认值为 app,会影响到查找 AndroidManifest 问题, 如果没找到 AndroidManifest,则需要手动修改,参考下面的 AndroidManifest 配置相关说明) 举个例子:
npm run configureJPush a54d0c2cb761ba030650534a app
- react-navigation-slide-from-right-transition 将所有的页面设置为 fromRight,怎么设置某个页面fromButtom
- 打开拍照速度, 相机加载之前的动画?
- echarts 打包后不显示图,与rn 48 兼容不好