react native
one_four_two
这个作者很懒,什么都没留下…
展开
-
React Native中使用FlatList组件实现上拉刷新、下拉加载
文章目录使用到的FlatList属性示例代码App.jsHome.jsFlatList.js使用到的FlatList属性data:值为array 渲染列表的数据源,目前只支持普通数组renderItem:值为function 从data中挨个取出数据并渲染到列表中。ListEmptyComponent:组件 data为空数组是渲染该组件ListFooterComponent:组件 列表...原创 2019-01-14 16:14:02 · 11576 阅读 · 3 评论 -
react native使用SwipeableFlatList组件实现类似QQ消息列表左滑出现操作按钮的效果
文章目录说明SwipeableFlatList组件特有属性说明示例代码App.jsHome.jsSwipeableFlatList.js效果图说明使用的组件是SwipeableFlatList和FlatList实现的效果差不多,只是在列表上左滑出现了类似QQ消息列表的操作按钮,直接贴出列表代码。公用属性请看 这里SwipeableFlatList组件特有属性说明renderQuickAc...原创 2019-01-14 17:17:29 · 9585 阅读 · 0 评论 -
React Navigation中整合redux
安装以下packagecnpm install --save react-navigation-redux-helperscnpm install --save reduxcnpm install --save react-reduxcnpm install --save redux-devtoolsApp.jsimport React from 'react'import...原创 2019-02-12 22:32:59 · 390 阅读 · 0 评论 -
React Native中的布局
使用width和heightreact native中width和height没有单位,表示的是与设备像素密度无关的逻辑像素点<View style={{width:100,height:100,backgroundColor: 'gray'}}> <Text style={{fontSize: 16}}>测试字体</Text></Vie...原创 2019-01-29 09:35:12 · 321 阅读 · 0 评论 -
React Native中解析HTML
使用这个react-native-htmlview可以解析HTML字符串。实现效果和vue中的v-html指令或jQuery中$(Selector).html()相同示例:import React from 'react'import {Text,View} from 'react-native'import HTMLView from 'react-native-htmlview'e...原创 2019-01-29 23:26:06 · 3344 阅读 · 0 评论 -
react native中icon使用
运行以下命令:yarn add react-native-vector-iconsreact-native link react-native-vector-icons示例:import React,{Component} from 'react'import {View,Text} from 'react-native'import Ionicons from 'react-nati...原创 2019-02-12 19:44:49 · 1897 阅读 · 1 评论