npm或yarn安装相关插件

https://blog.csdn.net/w345731923/article/details/82852459

yarn add [email protected]
react-native link react-native-gesture-handler
react-native自带的PanResponder手势监视器由JS响应器系统控制而react-native-gesture-handler是在UI线程中识别和跟踪手势。

若使用RN官方提供的手势管理在与发生在主线程上的触摸交互(如iOS滑块或任何滚动视图)时,经常会遇到问题。==由于主线程必须同步决定JS或滚动视图是否应该成为响应器,而JS只能异步响应并不能立即拒绝Native事件的响应,导致手势操作被这些Native组件劫持。==

ps: 上面提到的JS不能立即拒绝Native事件的响应对应PanResponder中的onPanResponderTerminationRequest方法,当该方法返回false时表示拒绝其他组件响应当前的手势。

npm install [email protected] --save
react-native link react-native-fs
将文本写入本地 txt
读取txt文件内容
在已有的txt上添加新的文本
删除文件
下载文件(图片、文件、视频、音频)
上传文件 only iOS

yarn add @react-native-community/[email protected]
react-native link @react-native-community/async-storage
react-native本地文件存储数据
storeData = async () => {
try {
await AsyncStorage.setItem('@storage_Key', 'stored value')
} catch (e) {
// saving error
}
}

读取数据
getData = async () => {
try {
const value = await AsyncStorage.getItem('@storage_Key')
if(value !== null) {
// value previously stored
}
} catch(e) {
// error reading value
}
}

npm install [email protected] --save
react-native link react-native-picker
react-native调用本地相机功能

yarn add @react-native-community/[email protected]
react-native link @react-native-community/async-storage

npm install [email protected]
react-native link react-native-view-shot
1,可以截取当前屏幕或者按照当前页面的组件来选择截取,如当前页面有一个图片组件,一个View组件,可以选择截取图片组件或者View组件。支持iOS和安卓。
1,需要将分享页生成图片,并分享到微信好友与朋友圈。

yarn add [email protected]
react-native link react-native-image-picker
用图片选择器react-native-image-picker拍照、选照片

发布:2018/3/7

有时我们程序中需要提供用户上传照片的功能。照片可以从设备相册中选择,也可以使用摄像头直接拍摄。这个功能使用 react-native-image-picker 库就可以很方便的实现。

npm install react-navigation --save
npm install [email protected] --save
React Navigation的诞生,源于React Native社区对基于Javascript的可扩展且使用简单的导航解决方案的需求。
React Navigation是Facebook,Expo和React社区的开发者们合作的结果:它取代并改进了React Native生态系统中的多个导航库,其中包括Ex-Navigation,React Native的Navigator和NavigationExperimental组件
npm install --save react-native-textarea
npm install --save [email protected]
@ant-design/react-native中关于TextAreaItem的计数功能 —count

npm install react-native-storage –save
npm install [email protected] -save
https://www.cnblogs.com/YooHoeh/p/9381416.html
react-native-storage

这是一个本地持久存储的封装,可以同时支持react-native(AsyncStorage)和浏览器(localStorage)。ES6语法,promise异步读取,使用jest进行了完整的单元测试。
https://www.cnblogs.com/YooHoeh/p/9381416.html

用于解决iOS和Android启动白屏问题及简单的启动页面展示
npm i react-native-splash-screen@版本号 --save
yarn add [email protected]
react-native link react-native-splash-screen or rnpm link react-native-splash-screen

yarn add react-native-splash-screen
yarn add [email protected]
react-native link react-native-splash-screen

React-Native下拉框控件
npm i react-native-modal-dropdown
npm i react-native-modal-dropdown -save
react-native绘图
npm install react-native-loading-spinner-overlay
yarn add react-native-loading-spinner-overlay

react-native放大缩小图片
npm i react-native-image-zoom-viewer --save

npm i react-native-easy-toast --save
npm install react-native-easy-toast --save

Base64编解码算法在Nodejs的buffer组件中有支持,首先我们需要在项目根目录下运行命令行安装buffer依赖:
npm install buffer --save
npm install [email protected] --save
moment -- react中处理时间的库
npm install moment --save
npm install [email protected] --save
随着 React Native 的升级,系统废弃了很多的东西,过去我们可以直接使用 React.PropTypes 来进行属性确认,不过这个自 React v15.5 起就被移除了,转而使用 prop-types 库来进行替换。
npm install --save prop-types

https://blog.csdn.net/sinat_17775997/article/details/77770114
https://www.jianshu.com/p/c7a8f115dca0

你可能感兴趣的:(npm或yarn安装相关插件)