![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react native
文章平均质量分 53
baijianwei0408
这个作者很懒,什么都没留下…
展开
-
react native 截屏
使用react-native-view-shot截取长屏方式import ViewShot from "react-native-view-shot"class ExampleCaptureScrollViewContent extends Component { render() { return ( <ScrollView> ...原创 2019-05-17 15:51:31 · 1026 阅读 · 0 评论 -
redux
三大原则单一数据源整个应用的state都存储在一个状态树中State是只读的只能通过action来改变state使用纯函数来执行修改只能通过action来同志reducer来改变stateActionaction通过store.dispatch把通知发送到reducer中,reducer根据发送来的type进行分别处理。下面就是一个action。{ type: "ADD_...原创 2019-05-24 15:50:10 · 206 阅读 · 0 评论 -
在react native中使用redux
首先创建项目react-native init rn-redux然后进入项目继续安装yarn add react-redux redux redux-thunk项目结构目录如下在reducers文件夹中创建listReducer.js文件import { ACTION_LIST_GET_LIST } from "../actions";const initState = { ...原创 2019-05-24 16:11:24 · 430 阅读 · 0 评论 -
react-native run-ios启动报错 No bundle URL present Make sure you're running a packager server...解决办法
项目在android环境中运行起来没问题,但是在ios中报错,然后这里找到两种解决办法方法一:项目中打开一个终端,运行react-native start启动服务器再次打开一个终端,运行react-native run-ios方法二:删除ios文件夹下面的main.jsbundle文件中的内容运行react-native bundle --entry-file index.js --...原创 2019-05-25 16:16:37 · 1050 阅读 · 0 评论 -
react native 手势绘图
import React, { Component } from "react"import { View, ART, PanResponder, Dimensions} from "react-native"let { Surface, Shape, Path} = ART;let { height: deviceHei...原创 2019-05-17 16:08:31 · 441 阅读 · 0 评论