Skip to content

Commit e4d583e

Browse files
committed
feat; up
1 parent f0a47d3 commit e4d583e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

react+ts写一个类ant-desing库.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,28 @@ export default Hello
115115
* 有依赖更新和卸载都执行,(任意一项发生变化)
116116
* 无依赖,只有卸载执行
117117

118+
## 自定义 hook
119+
120+
* 自定义的 hook 没有一般没有ui,不需要做 view 的操作,抽离出一些公共的逻辑,一般情况连 props 都不需要传入
121+
* 自定义hook必须以 use 开头,比如 `useMousePosition`
122+
123+
## 没有对比没有伤害
124+
125+
### 高阶组件 hoc
126+
127+
* 高阶组件就是一个函数,接受一个组件作为参数,返回一个新的组件
128+
129+
* 思考
130+
131+
空节点
132+
133+
```html
134+
<>
135+
</>
136+
```
137+
138+
typing 配置是干什么的
139+
118140

119141

120142

0 commit comments

Comments
 (0)