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
因为微前端方案需要做成应用可插拔,所以产生了需要卸载路由的需求。
尝试使用stop方法卸载:
stop
stateman 提供了 stop 方法,但是该方法只卸载了内部histery, 组件依然在内存中,所以组件的destroy方法不会触发, 导致应用无法卸载干净,对于全局对象的事件没能及时销毁。
stateman
histery
destroy
所以希望能够提供一种能够销毁方案来销毁整个应用, 例如在 https://github.com/regularjs/regular-state/blob/master/src/client.js#L157 这里新增一个 destroy 的生命周期,并重载 stateman 的 stop 方法调用 destroy 实现。
The text was updated successfully, but these errors were encountered:
整个应用指的是 卸载路由和销毁路由对应的View吗?
Sorry, something went wrong.
是的,销毁路由监听,销毁所有组件。
周末改一下 @Qquanwei
leeluolee
Successfully merging a pull request may close this issue.
因为微前端方案需要做成应用可插拔,所以产生了需要卸载路由的需求。
尝试使用
stop
方法卸载:stateman
提供了stop
方法,但是该方法只卸载了内部histery
, 组件依然在内存中,所以组件的destroy
方法不会触发, 导致应用无法卸载干净,对于全局对象的事件没能及时销毁。所以希望能够提供一种能够销毁方案来销毁整个应用, 例如在 https://github.com/regularjs/regular-state/blob/master/src/client.js#L157 这里新增一个 destroy 的生命周期,并重载 stateman 的 stop 方法调用 destroy 实现。
The text was updated successfully, but these errors were encountered: