react-native常用插件总结

插件名称 插件功能 对应GitHub的插件地址
UI组件
vector-icons 矢量图标 https://github.com/oblador/react-native-vector-icons
circular-progress 环形进度条 https://github.com/bgryszko/react-native-circular-progress
popup-menu popup-menu https://github.com/instea/react-native-popup-menu
parallax-view 下拉放大 https://github.com/lelandrichardson/react-native-parallax-view
htmlview 网页 https://github.com/jsdf/react-native-htmlview
textinput-effects 输入框 https://github.com/halilb/react-native-textinput-effects
drawer 抽屉控件 https://github.com/root-two/react-native-drawer
tabs 页签 https://github.com/aksonov/react-native-tabs
scrollable-tab-view 滑动页签 https://github.com/skv-headless/react-native-scrollable-tab-view
react-native-tab-navigator 导航 https://github.com/happypancake/react-native-tab-navigator
react-navigation 导航 https://github.com/react-community/react-navigation
react-native-navigation 原生导航 https://github.com/wix/react-native-navigation
button 按钮 https://github.com/ide/react-native-button
action-button 动态按钮 https://github.com/mastermoo/react-native-action-button
segmented-control-tab 分段按钮 https://github.com/kirankalyan5/react-native-segmented-control-tab
simple-radio-button 单选按钮 https://github.com/moschan/react-native-simple-radio-button
check-box 多选框 https://github.com/crazycodeboy/react-native-check-box
highly-customizable-action-sheet action-sheet https://github.com/knightsj/react-naive-highly-customizable-action-sheet
lightbox lightbox https://github.com/oblador/react-native-lightbox
gifted-listview 列表 https://github.com/FaridSafi/react-native-gifted-listview
swipe-list-view 侧滑列表 https://github.com/jemise111/react-native-swipe-list-view
swipe-left 侧滑列表 https://github.com/yzsolo/react-native-swipe-left
slider 滑块 https://github.com/jeanregisser/react-native-slider
foldview 折叠控件 https://github.com/jmurzy/react-native-foldview
gifted-form 表单 https://github.com/FaridSafi/react-native-gifted-form
spinkit 加载动画 https://github.com/maxs15/react-native-spinkit
loader 加载动画 https://github.com/mohebifar/react-native-loader
orientation 横竖屏 https://github.com/yamill/react-native-orientation
carousel 轮番页 https://github.com/nick/react-native-carousel
swiper 轮播图 https://github.com/leecade/react-native-swiper
viewpager 分页控件 https://github.com/race604/react-native-viewpager
modalbox 模态对话框 https://github.com/maxs15/react-native-modalbox
root-modal 模态对话框 https://github.com/magicismight/react-native-root-modal
calendar 日历 https://github.com/christopherdro/react-native-calendar
calendars 日历 https://github.com/wix/react-native-calendars
calendar-strip 日期控件 https://github.com/BugiDev/react-native-calendar-strip
easy-toast 提示框 https://github.com/crazycodeboy/react-native-easy-toast
root-toast 提示框 https://github.com/magicismight/react-native-root-toast
starRating 星星评分组件 https://github.com/bluesky0109/react-native-starRating
splash-screen 启动页 https://github.com/crazycodeboy/react-native-splash-screen
verification 验证码 https://github.com/asyalas/react-native-verification
功能组件
share 分享控件 https://github.com/EstebanFuentealba/react-native-share
contacts 通讯录 https://github.com/rt2zz/react-native-contacts
communications 通信 https://github.com/anarchicknight/react-native-communications
qrcode 二维码生成控件 https://github.com/cssivision/react-native-qrcode
AC-QRCode 二维码生成控件 https://github.com/MarnoDev/AC-QRCode-RN
barcodescanner 二维码扫描 https://github.com/ideacreation/react-native-barcodescanner
qrcode-scanner-view 二维码扫描 https://github.com/MarnoDev/react-native-qrcode-scanner-view
picker 选择器 https://github.com/beefe/react-native-picker
wheel-picker 选择器 https://github.com/lesliesam/react-native-wheel-picker
image-picker 图片选择 https://github.com/react-community/react-native-image-picker
tree-select 树形图 https://github.com/suwu150/react-native-tree-select
speech-iflytek 讯飞语音识别 https://github.com/zphhhhh/react-native-speech-iflytek
amap3d 高德地图 https://github.com/qiuxiang/react-native-amap3d
baidumap-sdk 百度地图(含聚合点) https://github.com/qiuxiang/react-native-baidumap-sdk
图表
charts-wrapper 图表 https://github.com/wuxudong/react-native-charts-wrapper
pathjs-charts 图表 https://github.com/capitalone/react-native-pathjs-charts
echarts 图表 https://github.com/somonus/react-native-echarts
echarts 图表 https://github.com/remobile/react-native-echarts
echarts-zzs 图表 https://github.com/ZScholes18/rn-echarts-zzs
媒体
camera 照相机 https://github.com/lwansbrough/react-native-camera
speech-iflytek 语音识别 https://github.com/zphhhhh/react-native-speech-iflytek
speech-to-text-ios 语音识别(iOS) https://github.com/muhaos/react-native-speech-to-text-ios
xunfei-speechrecognizer 讯飞语音听写(iOS) https://github.com/zhoumeitong/react-native-xunfei-speechrecognizer
sound 音乐播放 https://github.com/zmxv/react-native-sound
audio 音频记录 https://github.com/jsierles/react-native-audio
文件操作
fs 文件读写 https://github.com/itinance/react-native-fs
storage 存储 https://github.com/sunnylqm/react-native-storage
simple-store 存储 https://github.com/jasonmerino/react-native-simple-store
aws3 上传图片到aws3 https://github.com/benjreinhart/react-native-aws3
其他
keyboard-spacer 避免键盘遮挡 https://github.com/Andr3wHur5t/react-native-keyboard-spacer
webview-bridge WebView Javascript Bridge https://github.com/alinz/react-native-webview-bridge
animatable 动画 https://github.com/oblador/react-native-animatable
svg 矢量图 https://github.com/react-native-community/react-native-svg
fetch-polyfill 网络请求超时处理 https://github.com/robinpowered/react-native-fetch-polyfill
device-info 设备信息 https://github.com/rebeccahughes/react-native-device-info
cookies 获取cookies信息 https://github.com/joeferraro/react-native-cookies
websocket websocket https://github.com/pladaria/reconnecting-websocket
immutability-helper 更新局部数据 https://github.com/kolodny/immutability-helper
uuid 创建uuid https://github.com/eugenehp/react-native-uuid
bundle-visualizer 包分析工具 https://github.com/IjzerenHein/react-native-bundle-visualizer

常用插件修改说明

1、react-native-root-toast

报错:null is not an object(evaluting '_this._root_setNativeProps')

修改 react-native-root-toast/lib/ToastContainer.js

componentWillUnmount = () => {
    Dimensions.removeEventListener('change', this._windowChanged);
    Keyboard.removeListener('keyboardDidChangeFrame', this._keyboardDidChangeFrame);
    -this._hide();
    +this._root&&this._hide();
};

2、react-naive-highly-customizable-action-sheet

报错:undefined is not an object (evaluating '_react.PropTypes.array')

修改 react-naive-highly-customizable-action-sheet/index.js

-import React, {Component, PropTypes} from 'react';
+import React, {Component} from 'react';

import {
     StyleSheet,
     View,
     TouchableOpacity,
     TouchableHighlight,
     TouchableWithoutFeedback,
+    ViewPropTypes,
     BackHandler
 } from 'react-native';

+import PropTypes from 'prop-types'

3、react-native-modalbox(^1.6.0)

问题:当使用coverScreen=true时,关闭modal页面上方出现闪屏

修改 react-native-modalbox/index.js

useNativeDriver: true => useNativeDriver: false

参考:https://github.com/maxs15/react-native-modalbox/issues/239

4、react-native-baidumap-sdk(^0.6.0)

问题:地图和其他页面切换时黑屏

修改react-native-baidumap-sdk/lib/android/src/main/java/cn/qiuxiang/react/baidumap/mapview/BaiduMapView.kt文件

val mapView = MapView(context)
改为
val mapView = TextureMapView(context)

参考:https://github.com/qiuxiang/react-native-baidumap-sdk/issues/60

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,222评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,455评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,720评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,568评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,696评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,879评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,028评论 3 409
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,773评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,220评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,550评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,697评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,360评论 4 332
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,002评论 3 315
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,782评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,010评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,433评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,587评论 2 350

推荐阅读更多精彩内容