This commit is contained in:
1708-huayu 2023-11-22 19:14:28 +08:00
parent 639450a8c6
commit 6f48bbb8aa
18 changed files with 79 additions and 0 deletions

45
react/qf/1.md Normal file
View File

@ -0,0 +1,45 @@
# 特性
1. 声明式
2. 虚拟bom
3. 单向流
# 学习内容十项
1. react基础
2. react hooks
3. react 路由
4. react redux
5. 组件库
6. immutable
7. Mobx
8. react+ts
9. 单元测试
10. dva+umi
# 虚拟bom
例如刷朋友圈新来的数据和现有的数据比较处理而不是清空后重新加载减少dom操作。
# 包管理
## nvm
node version manage
## npm
node package manage
## nrm
node remote manage
![](img/nrm微信截图_20231024104526.png)
# jsx
javascript+xml
# 快捷键智能检测插件
ES7 React/Redux/GraphQL/React-Native snippets
# 行内式函数组件
```javascript
const Bar = ()=>{<div>123</div>}
```
# 模板语法规则读取js信息
{}

34
react/qf/2.md Normal file
View File

@ -0,0 +1,34 @@
在事件中调用函数不加(),加()后直接执行并且返回undefined。
# 函数方法调用
![](img/函数写法1微信截图_20231027164242.png)
![](img/函数写法微信截图_20231027164242.png)
# 类中this指向问题
## 箭头函数
this指向外部类的this
## 普通函数
this谁调用指向谁
# 关键字
call 改变this自动执行函数
apply 改变this自动执行函数
bind 改变this不自动执行函数 。需要加()执行函数
# 类组件
ref引用
![](img/ref微信截图_20231027180729.png)
# 函数组件
状态hook
## 严格模式
React.StrictMode
# state
# 数组循环渲染
key值解析
虚拟dom
尽量不去修改原状太 ...赋值中间变量
split(删除位置索引,删除个数)

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB