We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HI, 我目前的使用场景是:
目前问题现象是
在页面首次加载时(子应用也在第一屏加载), window.history.state中缺少__MICRO_APP_STATE__属性, 导致页面在push进入子页面后无法返回初始页面. 点击浏览器back后url地址更新, 但是页面不会重新渲染, 也不会触发任何路由事件.
初步排查了下, 应该与下面这行有关 https://github.com/micro-zoe/micro-app/blob/d47efeef5c088faa049435b806f20b7a8b42e6e6/src/sandbox/router/location.ts#L377
在native模式下, 路由首次加载, 由于url与rawLocation完全相等. 导致初始__MICRO_APP_STATE__没有写入history.state中, 进而造成返回初始页失败.
目前hack解决方案
在页面初始加载后, 手动replace一次 让state写入, 就可以正常返回了. 不确定这个地方是不是为了解决其他框架问题才特意加上的吗?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
在页面首次加载时(子应用也在第一屏加载), window.history.state中缺少__MICRO_APP_STATE__属性, 导致页面在push进入子页面后无法返回初始页面. 点击浏览器back后url地址更新, 但是页面不会重新渲染, 也不会触发任何路由事件.
初步排查了下, 应该与下面这行有关
https://github.com/micro-zoe/micro-app/blob/d47efeef5c088faa049435b806f20b7a8b42e6e6/src/sandbox/router/location.ts#L377
在native模式下, 路由首次加载, 由于url与rawLocation完全相等. 导致初始__MICRO_APP_STATE__没有写入history.state中, 进而造成返回初始页失败.
在页面初始加载后, 手动replace一次 让state写入, 就可以正常返回了. 不确定这个地方是不是为了解决其他框架问题才特意加上的吗?
环境信息
The text was updated successfully, but these errors were encountered: