![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
React Native
流川枫与苍井小姐
这个作者很懒,什么都没留下…
展开
-
React Native Android 即时热更新bundle 以及增量更新bundle~
本文仅仅提供热更新与热更新的思路 具体实现代码会提供一些核心代码。1. 加载bundle 我加载bundle的方式不是放在RaactActivity中,而是实现ReactApplication,放在mainapplication,正常Android代码也会有一个application是程序启动的一些初始化工作。代码如下:private final ReactNativeHost mRe原创 2017-03-08 10:03:07 · 3094 阅读 · 0 评论 -
react-native react-navigation集成redux以及验证的flow
闲话不多说了,关于redux的基础用法我就不多叙述了.这个demo主要是解决你你想在全局改变某一个数据. 源码原创 2017-12-17 18:10:28 · 2701 阅读 · 0 评论 -
redux美元符$
$符号加上一个大括号,学术名称叫做 占位符 ,用来占住位置,让其它功能在某一个时间替换掉它,替换的来源一般是properties文件。[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(item => { return { id: item, title: `[${item}]爱情买卖`, t原创 2017-12-16 10:38:58 · 303 阅读 · 0 评论 -
React Native fench FormData 上传文件
首先说下这个问题很坑,append的Js的object类型无效,我们后台用的是java 上错不成功的代码let url = 'http://192.168.1.120:8090/app/release'; let params = {parentId: "0", text: this.state.textContent, postType: 0, profitType: 0}原创 2017-11-22 10:59:43 · 6984 阅读 · 0 评论 -
react-navigation的回调方法callback
screenA const DEMO_TOKEN = await AsyncStorage.getItem('id_token'); if (DEMO_TOKEN === null) { this.props.navigation.navigate('screenB', { onGoBack: () => this.refresh(), }); return原创 2017-11-20 14:47:44 · 2589 阅读 · 0 评论 -
Android ReactNative 极光、友盟、高德地图、支付宝、微信支付解决方案
Android ReactNative 极光、友盟、高德地图、支付宝、微信支付解决方案说明一下,目前我们整个项目用的都是用react native写下来的。事实上我负责Android端这边的配置,还有个同事负责iOS方面的配置,并且我们两个人同时负责4个App,Android两个iOS两个。在这我不想讨论reactnative的性能,还有体验。就我个人来说,我们开发的App,比市面上一般的App要更原创 2017-07-31 11:56:17 · 4458 阅读 · 0 评论 -
React native 沉浸式状态栏解决方案
React native 沉浸式状态栏解决方案博客上有很多的沉浸式解决方案,不过都是针对原生activity的方案。在react native中却不适用。 首先我们看一下RN中的StatusBar中的属性: translucent bool :指定状态栏是否透明。设置为true时,应用会在状态栏之下绘制(即所谓“沉浸式”——被状态栏遮住一部分)。常和带有半透明背景色的状态栏搭配使用。 js中调原创 2017-07-10 10:22:07 · 11281 阅读 · 3 评论 -
Error:(171, 0) No such property: sdkHandler for class: com.android.build.gradle.LibraryPlugin
Error:(171, 0) No such property: sdkHandler for class: com.android.build.gradle.LibraryPlugin解决办法 downgrading gradle 2.3 to 2.2.3 resolved this issue.https://code.google.com/p/android/issues/detail?id原创 2017-06-22 21:07:04 · 5746 阅读 · 0 评论 -
rn 0.38 升到0.42 后 android出的问题 undefined is not function evaluating globalObject.hasownproperty('promi
如果出现此问题,建议你查看node-moudles中的es6-promise,如果有依赖请停止使用~~当时库是react-native-http-cache依赖了es6-promise,还有react-native-http-cache这个裤需要依赖okhhtp3.4.1,但是在我当前.42的react-native中,他却依赖okhttp2.4.X,导包时会出现问题,解决方案是参考库文件,然后重写原创 2017-03-17 09:26:33 · 3829 阅读 · 1 评论 -
componentWillMount vs componentDidMount 那个生命周期方法更适合请求数据?
在React-Native中向服务器请求数据到底应该在哪里请求? 有两个方法可以请求数据:componentWillMountcomponentDidMount除了这两个函数,render方法肯定不是合适的请求数据的地方,因为在React-Native中请求数据都是异步的(fetch),如果这样做肯定会带来一些不好的影响.下面分析一两个方法的优缺点.componentWi翻译 2018-02-02 15:04:39 · 6085 阅读 · 2 评论