会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
谁明浪子心
博客园
首页
联系
管理
1
2
3
4
5
···
13
下一页
[置顶]
React学习目录
摘要: React基础 0.JavaScript基础知识 1.React语法规则 2.React组件及其三大属性 3.React事件处理、收集表单数据、高阶函数 4.React生命周期 5.key的使用 React高级 1.Tolist案例(父子传参实现增删改) 2.github搜索案例(axios、pub
阅读全文
posted @ 2021-09-03 17:21 tomjoy
阅读(142)
评论(0)
推荐(0)
2021年9月24日
基于pgpool搭建postgressql集群部署
摘要: postgresql集群搭建 基于pgpool中间件实现postgresql一主多从集群部署,这里用两台服务器作一主一从示例 虚拟机名 IP 主从划分 THApps 192.168.1.31 主节点 YY-Test-01 192.168.1.36 从节点 vip 192.168.1.100 虚拟ip
阅读全文
posted @ 2021-09-24 14:00 tomjoy
阅读(4984)
评论(0)
推荐(1)
2021年9月3日
react-redux的使用
摘要: 2.react-redux的使用 npm install --save react-redux 1.基本使用 containers/Count.jsx -- 容器组件 -- 用于传递 redux保存的状态和操作状态的方法 到 UI组件中 // 引入Count的UI组件 import CounUI f
阅读全文
posted @ 2021-09-03 16:55 tomjoy
阅读(520)
评论(0)
推荐(0)
redux的使用
摘要: 1.redux的使用 核心概念 action 动作的对象 包含2个属性 type:标识属性, 值为字符串, 唯一, 必要属性 data:数据属性, 值类型任意, 可选属性 例子:{ type: 'ADD_STUDENT',data:{name: 'tom',age:18} } reducer 用于初
阅读全文
posted @ 2021-09-03 16:54 tomjoy
阅读(134)
评论(2)
推荐(0)
render props和Error boundary(错误边界)
摘要: 4. render props和Error boundary(错误边界) 4.1 render props 如何向组件内部动态传入带内容的结构(标签)? Vue中: 使用slot技术, 也就是通过组件标签体传入结构 <A><B/></A> React中: 使用children props: 通过组件
阅读全文
posted @ 2021-09-03 16:51 tomjoy
阅读(280)
评论(0)
推荐(0)
context和optimize优化
摘要: 3. context和optimize优化 3.1 context context用于祖孙组件之间的传参 import React, {Component} from 'react'; import './index.css' // 创建一个context组件,供传递数据使用 const MyCon
阅读全文
posted @ 2021-09-03 16:49 tomjoy
阅读(70)
评论(0)
推荐(0)
hook和Fragment
摘要: 2.hook和Fragment 2.1 hook 1. React Hook/Hooks是什么? (1). Hook是React 16.8.0版本增加的新特性/新语法 (2). 可以让你在函数组件中使用 state 以及其他的 React 特性 2. 三个常用的Hook (1). State Hoo
阅读全文
posted @ 2021-09-03 16:48 tomjoy
阅读(124)
评论(0)
推荐(0)
setState和lazyLoad懒加载
摘要: 1. setState和lazyLoad懒加载 1.1 setState setState更新状态的2种写法 (1). setState(stateChange, [callback]) 对象式的setState 1.stateChange为状态改变对象(该对象可以体现出状态的更改) 2.callb
阅读全文
posted @ 2021-09-03 16:47 tomjoy
阅读(79)
评论(0)
推荐(0)
编程式路由导航
摘要: 5.编程式路由导航 1.push和replace模式 {/* 路由模式改成replace替换 , 默认为push堆栈 */} <Link replace to={{pathname: '/home/message/detail', state:{id:msgObj.id, title: msgObj
阅读全文
posted @ 2021-09-03 16:43 tomjoy
阅读(217)
评论(0)
推荐(0)
React路由传参
摘要: 4.React路由传参 class Message extends Component { state = { messageArr: [ {id: '01', title: '消息1'}, {id: '02', title: '消息2'}, {id: '03', title: '消息3'}, ]
阅读全文
posted @ 2021-09-03 16:41 tomjoy
阅读(232)
评论(0)
推荐(0)
1
2
3
4
5
···
13
下一页
公告