Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
react-keep-alive
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
react-keep-alive
Commits
5880314e
Unverified
Commit
5880314e
authored
Mar 27, 2019
by
Shen Chang
Committed by
GitHub
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.zh-CN.md
parent
3824018d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
README.zh-CN.md
README.zh-CN.md
+1
-1
No files found.
README.zh-CN.md
View file @
5880314e
...
...
@@ -252,7 +252,7 @@ ReactDOM.render(
### `bindLifecycle`
这个高阶组件包装的组件将具有
**正确的**
的生命周期,进入组件必定会触发
`componentDidMount`
生命周期,离开也必定会触发
`componentWillUnmount`
生命周期。参考这个
[
例子
](
https://codesandbox.io/s/q1xprn1qq
)
能够更好的理解,注意打开控制台。
旧版本新增的
`componentDidActivate`
和
`componentWillUnactivate`
生命周期已经删除,这是考虑到了新增生命周期难免会不习惯,并且原来是参照 Vue 来写的组件,但其实并不完全适合 React。
旧版本新增的
~~
`componentDidActivate`
~~ 和 ~~
`componentWillUnactivate`
~~
生命周期已经删除,这是考虑到了新增生命周期难免会不习惯,并且原来是参照 Vue 来写的组件,但其实并不完全适合 React。
#### 例子
```
JavaScript
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment