ice-lab / icestark

:tiger: Micro Frontends solution for large application(面向大型应用的微前端解决方案),站点国内镜像:https://icestark.gitee.io
https://micro-frontends.ice.work
MIT License
2.04k stars 174 forks source link

【?Bug?】脚手架生成的子应用,会多次触发 mount unmount 生命周期 #682

Open chudongvip opened 1 year ago

chudongvip commented 1 year ago

Do you want to request a feature or report a bug?

What is the current behavior? 通过脚手架生成的子应用,在路由发生变化之后会多次触发 mountunmount 生命周期

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

start 方法中的 onRouteChange 会触发多次

离开子应用后会触发 2次 mount 和 1次 unmout 回调

What is the expected behavior?

start 方法中的 onRouteChange 会触发1次 离开子应用后会触发 1 次 mount 和 1 次 unmout 回调