Skip to content

react keep-alive 实现原理 #51

@nmsn

Description

@nmsn

https://juejin.cn/post/7088705614603354142

特征

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

原理

  • ref 保存需要 keep-alive 的组件
  • 对 keep-alive 组件使用隐藏代替销毁

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions