Skip to content

Commit 8b9f7ea

Browse files
committed
edit md
1 parent 62979b4 commit 8b9f7ea

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

react/component/src/lifecycle/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 生命周期
2+
23
React 是一个由虚拟 DOM 渲染成真实 DOM 的过程,这个过程称为组件的生命周期。React 把这个周期划分为三个阶段,每个阶段都提供了 will 和 did 两种处理方式,will 是指发生前,did 是指发生后。
34
- Mounting:组件渲染过程
45
- componentWillMount()
@@ -13,6 +14,7 @@ React 是一个由虚拟 DOM 渲染成真实 DOM 的过程,这个过程称为
1314
- 这个阶段没有对应的 did 方法
1415

1516
## Mounting
17+
1618
指首次渲染或者组件从 DOM 中移除后再次重新渲染,后者场景不会执行 getDefaultProps
1719
### 执行顺序
1820
1. getDefaultProps
@@ -161,4 +163,7 @@ var UnmountingComponent = React.createClass({
161163

162164
ReactDOM.render(<UnmountingComponent/>, document.getElementById('div3'));
163165
```
164-
[效果预览](https://wscats.github.io/react-tutorial/react/component/src/lifecycle/lifecycle.html)
166+
167+
### 效果预览
168+
169+
- [组件的生命周期](https://wscats.github.io/react-tutorial/react/component/src/lifecycle/lifecycle.html)

0 commit comments

Comments
 (0)