
react
文章平均质量分 52
加油吧qaq
这个作者很懒,什么都没留下…
展开
-
react学习-redux
redux Redux要求我们通过action来更新数据: 所有数据的变化,必须通过派发(dispatch)action来更新; action是一个普通的JavaScript对象,用来描述这次更新的type和content reducer是一个纯函数; reducer做的事情就是将传入的state和action结合起来生成一个新的state; eg: const redux=require('redux') const initialState={ counter:0 } //reduce原创 2021-03-09 20:06:22 · 92 阅读 · 0 评论 -
React学习-03组件间的通信
父子组件的通信 父传子组件 import React, { Component } from 'react' class ChildCpn extends Component { constructor(props){ super(props); } render() { console.log(this.props) const {name,age}=this.props; return (原创 2021-03-08 16:20:45 · 102 阅读 · 0 评论 -
React学习-02
react脚手架类组件函数组件react的生命周期 类组件 import React from 'react'; export default class App extends React.Component{ constructor(props){ super(props); this.state={ counter:0 } } dec(){ this.setState({原创 2021-03-05 14:30:05 · 261 阅读 · 1 评论 -
React学习-01
react初识简介react例子jsxJSX的书写规范:jsx注释jsx绑定属性active 切换style属性this绑定问题条件渲染实现v-show效果列表渲染列表过滤截取 简介 依赖三个库 react:核心代码 react-dom:react渲染在不同平台所需的核心代码 babel:将jsx转换成React react例子 class App extends React.Component{ constructor(){ super(); this.state=原创 2021-03-03 19:35:49 · 349 阅读 · 0 评论 -
TypeScript学习
TS初识hellowordTs中的数据类型基本类型数组类型类型推断联合类型接口定义函数类型别名枚举类型类泛型 helloword function hello() { console.log('helloword'); } hello(); 编译:tsc hello.ts Ts中的数据类型 基本类型 let isDone:boolean =false;//布尔型 let num:number=10;//数值类型 let str:string="123" //字符串定义 function原创 2021-03-03 10:13:05 · 258 阅读 · 0 评论