会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liuw_flexi
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
11
12
13
14
15
16
17
18
19
···
29
下一页
2019年10月18日
react native 之 在现有的iOS工程中集成react native
摘要: 在现有的iOS工程中集成react native, 或者说将react native引入到iOS 项目,是RN和iOS混合开发的必经之路 参考官网教程:https://reactnative.cn/docs/integration-with-existing-apps/ 但是会有一些步骤报错,这里记
阅读全文
posted @ 2019-10-18 16:13 liuw_flexi
阅读(1178)
评论(0)
推荐(0)
2019年10月12日
React Native 中不用手点击,代码实现切换底部tabBar
摘要: 参考:https://www.jianshu.com/p/02c630ed7725 tabBar1页面有按钮,点击切换到tabBar2 直接用this.props.navigation.navigate('tabBar2'); //这里tabBar1,tabBar2都在createBottomTab
阅读全文
posted @ 2019-10-12 14:05 liuw_flexi
阅读(249)
评论(0)
推荐(0)
2019年10月11日
React Native 中吐司组件react-native-easy-toast
摘要: https://github.com/crazycodeboy/react-native-easy-toast 用法: 在render()方法的return()中的最末尾: 在需要吐司的地方:
阅读全文
posted @ 2019-10-11 13:26 liuw_flexi
阅读(906)
评论(0)
推荐(0)
React Native 中 跨页面间通信解决方案之 react-native-event-bus
摘要: https://github.com/crazycodeboy/react-native-event-bus 用法: A页面和B页面中都有相同的列表,点击B页面中的收藏按钮,A页面会跟着更新
阅读全文
posted @ 2019-10-11 13:21 liuw_flexi
阅读(1435)
评论(0)
推荐(0)
React 之React.createContext
摘要: 使用Context,可以跨越组件进行数据传递 通过静态方法React.createContext()创建一个Context对象,这个Context对象包含两个组件,<Provider />和<Consumer />。 <Provider />的value相当于现在的getChildContext()
阅读全文
posted @ 2019-10-11 10:40 liuw_flexi
阅读(2800)
评论(0)
推荐(0)
2019年9月23日
react native 之 react-redux使用套路
摘要: redux是什么?他是一个state容器,这个容器中存放所有页面的state。 redux的运作方式是怎样的? actions: 可以理解为用户和手机间的交互行为,比如点了一个按钮,下拉刷新,上拉加载更多。。。都可以写成一个action, 一个页面可能会有很多个action。一般action.js中
阅读全文
posted @ 2019-09-23 14:02 liuw_flexi
阅读(413)
评论(0)
推荐(0)
react native之封装离线缓存框架
摘要: 请求数据=>本地有无缓存+缓存数据是否过期 =>可用 =>不可用 将代码封装成一个DataStore.js文件, 这里面主要提供:从本地获取数据,从网络获取数据,创建本地时间戳,请求数据入口 import {AsyncStorage} from 'react-native'; export defa
阅读全文
posted @ 2019-09-23 13:44 liuw_flexi
阅读(522)
评论(0)
推荐(0)
react native之使用AsyncStorage 进行数据持久化存储
摘要: 新建AsncStorageDemoPage.js import React, {Component} from 'react'; import { StyleSheet, View, Text, Button, TextInput, AsyncStorage, } from 'react-nativ
阅读全文
posted @ 2019-09-23 13:36 liuw_flexi
阅读(446)
评论(0)
推荐(0)
react native之使用 Fetch进行网络数据请求
摘要: 这是一个单独的页面,可以从其他地方跳转过来。 输入语言关键字,从github检索相关数据 import React, {Component} from 'react'; import { StyleSheet, View, Text, Button, TextInput, } from 'react
阅读全文
posted @ 2019-09-23 13:26 liuw_flexi
阅读(785)
评论(0)
推荐(0)
2019年9月19日
react navigation如何goBack到指定页面? 和使用react navigation跳转页面时传值。
摘要: 1. 首先是使用react navigation跳转页面时传值,A->B 利用 params = { name : 'XXX', age: 28, number : '18812345678' } 2. react navigation如何goBack到指定页面? https://www.cnblo
阅读全文
posted @ 2019-09-19 18:07 liuw_flexi
阅读(775)
评论(0)
推荐(0)
上一页
1
···
11
12
13
14
15
16
17
18
19
···
29
下一页
公告