![7b89922f82a168ef044e813455737575.png](https://i-blog.csdnimg.cn/blog_migrate/a0f9a887e5f44dc25f9ee7e8502b6e95.jpeg)
前言:从事RN开发快一年了,开发过程中遇到许多坑,连滚带爬的都趟过来了,简单总结下常用的RN插件,方便以后查阅。
建议:能自己写的插件就自己写吧,别偷懒,(虽然可能没有别人的好,起码也是自己造的儿子,哈哈说笑的),插件集成多了会多项目的维护造成一些麻烦。
下面插件只是RN插件集中的冰山一角,
1、启动屏插件,可自动设置RN启动页。
crazycodeboy/react-native-splash-screengithub.com![db87b1f8bef88bf64bcbd0ab89196d4b.png](https://i-blog.csdnimg.cn/blog_migrate/59961bb8941d045b70dd81c07f56c869.png)
2、tab切换插件,手势左右滑动和自动定义tab样式
ptomasroos/react-native-scrollable-tab-viewgithub.com![a983d21b4abbe81ab9af160762c4068e.png](https://i-blog.csdnimg.cn/blog_migrate/e60d42eff8eaf796c43315dd2f90c919.jpeg)
3、modal弹框插件,弹框位置和弹框范围
react-native-modalboxgithub.com4、picker选择器,日期选择器,时间选择器,一列或多列自定选择器
react-native-pickergithub.com5、storage存储,本地异步存储(说实话用的不是很爽)
sunnylqm/react-native-storagegithub.com![17e7ba784ca2c2e51fd64b269079cef1.png](https://i-blog.csdnimg.cn/blog_migrate/3f845177373bb1f1f6c623e18a2b3ce6.jpeg)
6、swipeout滑动删除,列表右滑动删除。
dancormier/react-native-swipeoutgithub.com![6f41885384f69ce0374006c266270f22.png](https://i-blog.csdnimg.cn/blog_migrate/e2d35120410b8ed2abf1aa6604798064.jpeg)
7、elements组件集,里面有很多组件,按钮,图像等...(这些小组件我喜欢自己封装)
react-native-elementsgithub.comreact-native-training8、crop图片裁剪,选择手机相册图片裁剪和网页图片裁剪(支出多选和单选)
ivpusic/react-native-image-crop-pickergithub.com![819065c8f5dfb1a394d067433aea93f2.png](https://i-blog.csdnimg.cn/blog_migrate/f8ee75511d46dedfcf3f2771d53d6e48.jpeg)
9、picker选择相册图片和选择相机
react-native-community/react-native-image-pickergithub.com![fca3b26b5b3a7a8fb2df13a4f4aeda1a.png](https://i-blog.csdnimg.cn/blog_migrate/baed5645165593ff773ba318beac17c5.png)
10、fast图片组件,RN组件Image替换品,他会自动帮你缓存图片,提高图片加载速度
react-native-fast-imagegithub.com11、lightbox图片预览,官方效果还可以(在android有些手上不怎么流畅)
oblador/react-native-lightboxgithub.com![349915631c60c40b404ad657a4998148.png](https://i-blog.csdnimg.cn/blog_migrate/49a565d05c1871be58ce2df596ba6837.jpeg)
12、viewer图片预览,效果一般但功能强大,支持图片方法,左右滑动预览。
ascoders/react-native-image-viewergithub.com![eb5e4615cefb758f5d0d2e2ea9b188b9.png](https://i-blog.csdnimg.cn/blog_migrate/4a2130262251ac8e01535f37c5107ebe.jpeg)
13、notification推送,支持本地和远程消息推送(但是不知道怎么动态设置图标)
react-native-push-notificationgithub.com14、video视屏播放器,控制栏不怎么好看,可以自己封装
react-native-videogithub.com15、lottie动画库,里面有很多动画,我没怎么用过
lottie-react-nativegithub.com16、LargeList列表滑动,支持下拉/上拉刷新和滚动不出现空白(与FlatList组件一致)
React Native LargeListbolan9999.github.io17、ripple波纹效果,用它包含起来,点击元素有波纹效果,可以做列表item。
react-native-material-ripplegithub.com18、orientation控制手机旋转和限制手机旋转
react-native-orientationgithub.com19、webView RN在做廋身,webView将被从核心模块移出
react-native-webviewgithub.com20、types变量类型验证
facebook/prop-typesgithub.com![18b648ad230241f601f3120ab879d328.png](https://i-blog.csdnimg.cn/blog_migrate/1774b1cdb7d6f65d6188ccb89ec0a4b7.png)