Skip to content

Commit ca384ad

Browse files
MuYunyunmujue
authored and
mujue
committed
docs: hooks update
1 parent 3241ca1 commit ca384ad

File tree

4 files changed

+10
-344
lines changed

4 files changed

+10
-344
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Hooks 新人培训演讲大纲
44

55
![](http://with.muyunyun.cn/ddbdcec2fc39ba350fc74647f4fad6f5.jpg-300)
66

7-
React 的 logo 是一个原子图案, 原子组成了物质。类似的, React 就如原子般构成了页面的表现; 而 Hooks 就如夸克, 其更接近 React 本质的样子, 但是直到 2019 (花了近 4 年时间)才被真正设计出来。 —— Dan in React Conf(2018)
7+
React 的 logo 是一个原子图案, 原子组成了物质。类似的, React 就如原子般构成了页面的表现; 而 Hooks 就如夸克, 其更接近 React 本质的样子, 但是直到 2019 年才被真正设计出来(花了近 4 年时间)。 —— Dan in React Conf(2018)
88

99
### React 中的逻辑复用
1010

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"react-scripts": "2.1.8"
1111
},
1212
"devDependencies": {
13-
"eslint": "^7.5.0",
1413
"eslint-config-airbnb": "^18.2.0",
1514
"eslint-config-prettier": "^6.11.0",
1615
"eslint-plugin-import": "^2.22.0",
@@ -25,8 +24,7 @@
2524
"start": "react-scripts start",
2625
"build": "react-scripts build",
2726
"test": "react-scripts test --env=jsdom",
28-
"eject": "react-scripts eject",
29-
"lint": "eslint ."
27+
"eject": "react-scripts eject"
3028
},
3129
"browserslist": [
3230
">0.2%",

src/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ import ReactDOM from "react-dom"
55
import { HookApp, ClassApp } from "./tasks/task1"
66
import Demo from "./tasks/task2"
77
import RuleCase from "./tasks/task3_if_rule"
8-
import useInterval from "./useInterval"
98
import "./styles.css"
109

1110
function View() {
1211
return (
1312
<>
14-
{/* <HookApp />
13+
<HookApp />
1514
<hr />
1615
<ClassApp />
17-
<hr /> */}
16+
<hr />
1817
{/* <Demo /> */}
19-
<RuleCase />
18+
{/* <RuleCase /> */}
2019
</>
2120
)
2221
}

0 commit comments

Comments
 (0)