Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react keep-alive 实现原理 #51

Open
nmsn opened this issue Oct 18, 2022 · 0 comments
Open

react keep-alive 实现原理 #51

nmsn opened this issue Oct 18, 2022 · 0 comments
Labels

Comments

@nmsn
Copy link
Owner

nmsn commented Oct 18, 2022

https://juejin.cn/post/7088705614603354142

特征

  • keep-alive 在移动端应用场景更广泛
  • 页面切换频繁场景多
  • 长页面状态保存

原理

  • ref 保存需要 keep-alive 的组件
  • 对 keep-alive 组件使用隐藏代替销毁
@nmsn nmsn added the React label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant