
React Native
peachesTao
一天一点点,时刻保持紧迫感!
展开
-
React-Native开发中常用的第三方控件持续更新
基于FlatList的下拉、上拉刷新组件react-native-refresh-list-view倒计时组件https://github.com/ljunb/rn-countdownreact-native-agora 基于Agora(YY技术团队)直播,视频会议组件https://github.com/DBshaoYan/react-native-agora 相转载 2017-09-04 22:35:04 · 616 阅读 · 0 评论 -
Unsupported top level event type "onGestureHandlerStateChange" dispatched
问题:Ios dev版本,使用第三方插件react-navigation做页面导航时,点返回按钮时报如下错:Unsupported top level event type "onGestureHandlerStateChange" dispatched开发环境如如下:"react-native": "0.55.4","react-navigation": "^3.11.0...原创 2019-07-14 10:52:53 · 1687 阅读 · 0 评论 -
关于react native 第三方组件安装、卸载的一些注意事项
转载于:https://www.jianshu.com/p/05b7e02d21d0关于react native 第三方组件安装、卸载的一些注意事项我使用的react native版本是 0.49.5,在开发的过程中经常会遇到安装、卸载的操作,一不小心(没有安装流程做)项目运行的就会报各种错误。建议在把第三方组件引入正式项目工程之前先在demo工程中跑通,否者你会浪费很多不必要的时间...转载 2019-07-14 13:32:00 · 594 阅读 · 0 评论 -
Unrecognized font family 'anticon'
问题:使用第三方库react-native-vector-icons在ios上报Unrecognized font family 'anticon'的错(用Xcode编译的):"react-native": "0.55.4","react-native-vector-icons": "^6.4.2",然后用react-native run-ios编译时报如下错:/Us...原创 2019-07-14 16:51:39 · 3254 阅读 · 0 评论 -
react-native-camera ios 闪退
问题:使用第三方库react-native-camera,在ios上打开调用摄像头界面时app闪退"react-native": "0.55.4","react-native-camera": "^0.7.0",解决方案:在Info.plist文件中添加如下代码:<key>NSCameraUsageDescription</key><str...原创 2019-07-14 17:59:06 · 1173 阅读 · 0 评论 -
ReactNative创建一个漂亮简洁好看的三角冒泡框
转载于:https://www.jianshu.com/p/ed14e5bf95bc前言想做一个类似聊天泡泡的ui组件,无奈找不到如何使用View创建三角形的例子。。突发奇想,css3可以通过更改样式,使一个div变成三角形,那么我们是不是也可以借鉴以下实现方法,然后移植到rn上?开干说干就干,首先搜集以下使用css3绘制三角形的教程,很多:纯CSS绘制三角形(各种角度)核心代...转载 2019-07-11 00:00:59 · 1766 阅读 · 0 评论 -
isMounted(...)is deprecated in plain JavaScript React classes
转载于:https://www.jianshu.com/p/938bb14b07aaReact-Navigation使用出现Warning: isMounted(...) is deprecated in plain Javascript Classes使用React-Navigation出现以下问题:Warning: isMounted(...) is deprecated i...转载 2019-07-15 22:40:28 · 523 阅读 · 0 评论 -
react-native组件避免重复渲染
转载于:https://blog.csdn.net/sinat_17775997/article/details/77971016react-native组件避免重复渲染react-native若有性能问题,很可能是由于组件的重复渲染,研究下相关知识点。转载http://www.tuicool.com/articles/vY7Vjymexport default class...转载 2019-08-04 23:10:21 · 1253 阅读 · 0 评论 -
React-native react-navigation 3.x 自定义切换动画
分类专栏:React-native版权声明:本文为博主原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/qq934235475/article/details/99580506继我们接入了react-navigation 作为导航,并且实现android从右往左滑,那我现在又想各个页面切换...转载 2019-08-28 00:10:41 · 658 阅读 · 0 评论 -
react-native中显示手机本地图片/视频
react-native中显示手机本地图片/视频已知文件路径'/data/user/0/com.ycdj/files/media/218787782/efa1d12f22d2/1235.jpg'只需在路径前面拼上file:///即可,如:<Image source={{uri:`file:///${mediaPath}`}} style={{width:200, heig...转载 2019-08-28 00:50:14 · 1521 阅读 · 3 评论 -
Could not find method google() for arguments [] on repository container.
问题:在react native中安装realm数据库后运行react-native run-android 时报如下错:开发环境:react-native:^0.55.4reaml:^2.27.0解决方案:1、打开项目根目录下android/gradle/wrapper/gradle-wrapper.properties将distributionUrl=https...原创 2019-06-27 14:03:01 · 38243 阅读 · 2 评论 -
React Native中pointerEvent属性
转载于:https://www.jianshu.com/p/70773038d850React Native中pointerEvent属性在React Native界面开发中, 如果使用绝对定位布局,在代码运行时的某个时刻有可能会遮盖住它的下方的某个组件。这是因为绝对定位只是说这个组件的位置由它父组件的边框决定。绝对定位的组件可以被认为会覆盖在它前面布局(JSX代码顺序)的组件的上...转载 2019-07-02 14:03:39 · 1887 阅读 · 0 评论 -
React Native https图片无法显示
react-native Image标签加载https网络图片不显示,代码如下:import React,{Component} from 'react';import {View,Image} from 'react-native';export default class ImageUse extends Component { render() { let im...原创 2018-06-28 16:33:23 · 3118 阅读 · 0 评论 -
React Native Navigator 被舍弃解决办法
React Native Navigator 被舍弃解决办法转载于:https://blog.csdn.net/xinganbu124/article/details/76099884Facebook 在 React Native 0.44 的时候将 Navigator 舍弃掉,推荐使用 react-navigation,但有一些老的项目已经使用了 Navigator 就不好迁移到 re...转载 2019-05-18 22:10:02 · 761 阅读 · 0 评论 -
react-native-vector-icons android图标乱码
问题:我用的字体是蚂蚁金服的AntDesign,在真机调试时乱码或无效(FontAwesome显示的不是指定的图片,AntDesign显示的是乱码)解决方案:步骤1、将自己需要的字体从\node_modules\react-native-vector-icons\Fonts中拷贝到\android\app\src\main\asserts\fonts中,如果asserts\f...原创 2019-05-18 22:50:25 · 1020 阅读 · 0 评论 -
TouchableHighlight无点击效果
转载于:https://www.jianshu.com/p/2245cc5e4a82在RN中,如果想给列表视图的项添加点击效果, 可以使用TouchableHighlight控件. 但是要注意此控件一定要有onPress属性, 不然点击没有任何效果renderMovieList = (movie) => { return( <TouchableHighli...转载 2019-05-18 23:08:49 · 913 阅读 · 0 评论 -
JS server not recognized
运行react-native run-android时,正常情况会弹出JS server如果出现“JS server not recognized, continuing with build...“说明JS server没有启动成功,需要检测8081端口是否被其他应用占用解除占用则正常运行...原创 2019-05-18 23:31:17 · 405 阅读 · 0 评论 -
could not find method compileOnly
问题:在使用react-navigation做页面导航运行react-native run-android编译时出现“Could not find method compileOnly for arguments”的错,我使用的版本信息如下:"react-native": "^0.55.4""react-navigation": "^3.11.0""react-native-ge...原创 2019-05-19 20:59:05 · 3700 阅读 · 0 评论 -
react-native-gesture-handler:compileReleaseJavaWithJavac FAILED
问题:在使用react-navigation做页面导行编译项目时报“react-native-gesture-handler:compileReleaseJavaWithJavac FAILED”的错我使用的版本信息如下:react-native": "^0.55.4""react-native-gesture-handler":"^1.2.1"报错截图如下:解决方案:...原创 2019-05-19 21:25:38 · 2622 阅读 · 0 评论 -
error: bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/objectSpread`
问题:在android手机上Reload react native 项目JS server报“error: bundling failed: Error: Unable to resolve module `@babel/runtime/helpers/objectSpread` “的错我使用的版本信息如下:"react-native": "^0.55.4""react-naviga...原创 2019-05-19 21:53:44 · 4960 阅读 · 0 评论 -
undefined is not an object(evaluating '_react2.PropTypes.oneOfType')
问题:在使用ac-qrcode二维码扫描包时,报错“undefined is not an object(evaluating '_react2.PropTypes.oneOfType')“包的版本信息如下:"react": "16.3.1","ac-qrcode": "^1.0.1",解决方案原因:ac-qrcode依赖于"react-native-camera": "^...原创 2019-05-20 20:08:52 · 3113 阅读 · 0 评论 -
react native jsx中render return需要注意的地方
看下面一个例子,定义一个MyModal组件,渲染hello world字样。export default class MyModal extends Component { constructor(props) { super(props); }; render() { return( <View&g...原创 2019-06-14 10:41:26 · 1016 阅读 · 0 评论 -
undefined is not an object (evaluating 'CameraManager.Aspect')
问题:react native 打包时报错undefined is not an object (evaluating 'CameraManager.Aspect')解决方案:react-native link react-native-camera转载 2019-06-25 16:12:36 · 1424 阅读 · 0 评论 -
react native 创建一个圆形按钮
How to create a circle button in React NativeHOW TO CREATE A CIRCLE BUTTON IN REACT NATIVEIn this React Native source code example, the source code below illustrate how to create a circle butto...转载 2019-08-29 00:05:55 · 3266 阅读 · 0 评论