react-activation
react-activation copied to clipboard
qiankun微前端使用KeepAlive刷新后状态有误
问题描述: 引用qiankun,在slaveapp的BasicLayout初始化PermissionContext用于控制页面子元素的权限;在uViewShell中useContext获取权限只读属性,状态正确;在uViewButton中useContext获取权限只读属性,状态错误。 层级关系如下:
- BasicLayout: true[Provider]
-- uViewShell: true [Consumer]
--- uViewButton: false[Consumer]
主应用页面:
子应用页面:
点击button跳转子应用的子模块:button中初始状态正确
点击F5刷新页面:button中状态错误

最简实现代码: mainapp.zip slaveapp.zip