logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

React-native学习-3-style样式

//3.style样式importReact,{useState}from'react';import{Text,StyleSheet,View}from'react-native';constStyleDemo=()=>{return(<Viewstyle={myStyles.container}><Textstyle={myStyles.background}>h

#react native
React-native学习-2-处理文本输入

//2.处理文本输入importReact,{useState}from'react';import{Text,TextInput,View}from'react-native';constPizzaTranslator=()=>{const[text,setText]=useState('');return(<View><TextInputstyl...

#react native
React-native学习-7-颜色

//7.颜色://RGB:rgb()和rgba()两种十六进制与函数方法//'#f0f'(#rgb)//'#ff00ff'(#rrggbb)//'rgb(255,0,255)'//'rgba(255,255,255,1.0)'//色调-饱和度-亮度(HSL):也支持hsl()和hsla()函数方法:'hsl(360,100%,100%)''hsla(360,100%,100%,1.0)'impor

#react native
React-native学习-19 - Fetch网络请求

贴个官网例子,使用的时候再细看//fetch 网络请求import React, { useEffect, useState } from 'react';import { ActivityIndicator, FlatList, Text, View } from 'react-native';const App = () => {const [isLoading, setLoading]

#react native
React-native学习-5-使用Flexbox布局

//5.使用Flexbox布局//flex:决定元素在主轴上如何填满可用区域//flexDirection:决定布局的主轴方向水平轴(row)方向排列竖直轴(column)方向排列默认值是竖直轴(column)方向。//justifyContent:决定其子元素沿着主轴的排列方式:flex-start(主轴的起始端)、center(子元素全显示在中间)、flex-end(主轴末尾段)、space-

#react native
React Native---Error: Unable to resolve module `./index.android` from ``:None of these file

一、问题:新建一个工程后,在执行react-native start 后访问:http://localhost:8081/index.android.bundle?platform=android报错:Error: Unable to resolve module `./index.android` from `D:\DevelopTools\ReactNativeProjects\FirstPr

#react native
React-native学习-8-长列表FlatList和SectionList分组列表

//8.使用长列表:FlatList组件必须的两个属性是data和renderItem。data是列表的数据源,而renderItem则从数据源中逐个解析数据,然后返回一个设定好格式的组件来渲染//SectionList分组列表importReact,{useState}from'react';import{View,Text,Image,FlatList,StyleSheet,SectionLi

#react native
React-native学习-18---React Navigation导航器跳转页面

几天没写了,解决项目中的小bug,今天主要贴出来:React Navigation导航器跳转页面,供自己和他人参考官网具体有详细说明,注意版本:https://reactnavigation.org/1.在项目中增加依赖:npm install @react-navigation/native //React Native项目中所需的软件包npm install @react-navigation

#react native
React-native学习-11-图片资源

//处理触摸事件importReact,{useState,Component}from'react';import{View,Text,Image,Button,Alert,StyleSheet,Platform,TouchableHighlight,TouchableOpacity,TouchableNativeFeedback,TouchableWithoutFeedback,}from'r

#react native
React-native学习-6-图片资源

//6.静态图片资源<Imagesource={require('./my-icon.png')}/>importReact,{useState}from'react';import{View,Text,Image}from'react-native';constImageDemo=()=>{return(<View><Text>h...

#react native
    共 28 条
  • 1
  • 2
  • 3
  • 请选择