-
Notifications
You must be signed in to change notification settings - Fork 2k
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
问题 Wrapper element for XXX is not existed! 必现, sandbox.loose 设为 true 的办法并不完美,请问有无完美的办法? #2547
Comments
Hello @FedLife. In order to facilitate location and troubleshooting, we need you to provide a realistic example. Please forking these link codesandbox or clone qiankun examples to your GitHub repository. 你好 @FedLife, 为了方便定位和排查问题,我们需要你提供一个重现实例,请提供一个尽可能精简的链接 codesandbox 或直接 clone qiankun examples,并上传到你的 GitHub 仓库。 |
重现问题的仓库( |
singular 配置为 true https://qiankun.umijs.org/zh/api#startopts |
|
看日志打印顺序都是对的,那就是应用本身的问题,比如 unmount 后代码还在跑 |
URL又跳到了heavyA啊,react16就自动卸载了 |
url变化:初始为 应该是要中止 |
对,问题就是为什么自动跳到了 heavyA。目测是 heavyA 的路由在前一次 unmount 时没有被卸载 |
@FedLife 解决了吗? 我也遇到了, 一个月了还没解决 |
没有,只是简单处理了下,在报错的时候让页面重载一次,保证有东西出来 |
Since the issue was labeled with |
我直接用loadMicroApp取代registerMicroApps,直接手动控制卸载注册,暂时脱离了这个Wrapper element for XXX is not existed! 的问题, 等qiankun3.0吧。 |
真的好坑,自动注册就报错了, 改成手动控制就没问题 |
真的好坑,这个问题我也遇到了,解决不了。手动控制都没有用 |
黑盒加魔法太多了。。 |
如果是 react18,unmountComponentAtNode 已经被标记为 Deprecated,取消挂载会报这个错误,改成 unmount |
问题 Wrapper element for XXX is not existed! 必现。issues有人问过,但没找到完美解决办法。简要说明如下:
进入微应用A时,不等页面渲染完,点击微应用B的入口,就报错了,在控制台可以观察到:
- 应用生命周期函数
beforeMount
和beforeLoad
打印的应用不一致(beforeLoad打印的是B,beforeMount打印的是A);-
Wrapper element for XXX is not existed!
的报错信息;sandbox.loose 设为 true 不完美的地方在于:虽没有报错,但渲染的应用是之前没出来的A,不是切换后的B
期望:在较重的微应用A没有出来时切到微应用B后,能够正常渲染微应用B。
The text was updated successfully, but these errors were encountered: