diff --git a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx index 07be71095e24..6f9b7834852b 100644 --- a/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx +++ b/packages/runtime/plugin-runtime/src/router/runtime/plugin.tsx @@ -177,9 +177,7 @@ export const routerPlugin = ( }, []); const { routes } = routerResult; - useEffect(() => { - routesContainer.current = routes; - }, [routes]); + routesContainer.current = routes; beforeCreateRouter = false;