From d16471aee1b6ee7cd29272d31f10f0e22939f576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=B2=E5=A5=88Sakina?= <59400654+fz6m@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:20:59 +0800 Subject: [PATCH] fix: received props on qiankun slave update (#12337) --- packages/plugins/libs/qiankun/master/MicroApp.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/plugins/libs/qiankun/master/MicroApp.tsx b/packages/plugins/libs/qiankun/master/MicroApp.tsx index 296ea7c3831c..cb8ba8eae07e 100644 --- a/packages/plugins/libs/qiankun/master/MicroApp.tsx +++ b/packages/plugins/libs/qiankun/master/MicroApp.tsx @@ -167,6 +167,13 @@ export const MicroApp = forwardRef( props: { settings: settingsFromConfig = {}, ...propsFromConfig } = {}, } = appConfig || {}; + const __globalRoutesInfo = { + appNameKeyAlias, + masterHistoryType, + base: globalSettings.base, + microAppRoutes: globalSettings.microAppRoutes, + }; + useEffect(() => { setComponentError(null); setLoading(true); @@ -185,12 +192,7 @@ export const MicroApp = forwardRef( ...propsFromConfig, ...stateForSlave, ...propsFromParams, - __globalRoutesInfo: { - appNameKeyAlias, - masterHistoryType, - base: globalSettings.base, - microAppRoutes: globalSettings.microAppRoutes, - }, + __globalRoutesInfo, setLoading, }, }, @@ -263,6 +265,7 @@ export const MicroApp = forwardRef( ...propsFromConfig, ...stateForSlave, ...propsFromParams, + __globalRoutesInfo, setLoading, };