frontend-app-api: expose root elements on specialized apps

Add an element shorthand to bootstrap and finalized app results so callers can render the root element without reaching through the tree instance.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-15 01:20:03 +01:00
parent e66bbfc85c
commit 03d2484cae
+2 -7
View File
@@ -17,7 +17,6 @@
import { JSX, lazy, ReactNode, Suspense, useEffect, useState } from 'react';
import {
ConfigApi,
coreExtensionData,
ExtensionFactoryMiddleware,
FrontendFeature,
FrontendFeatureLoader,
@@ -160,9 +159,7 @@ function PreparedAppRoot(props: {
);
if (!finalizedApp) {
return bootstrapApp.tree.root.instance!.getData(
coreExtensionData.reactElement,
)!;
return bootstrapApp.element;
}
const errorPage = maybeCreateErrorPage(finalizedApp);
@@ -170,7 +167,5 @@ function PreparedAppRoot(props: {
return errorPage;
}
return finalizedApp.tree.root.instance!.getData(
coreExtensionData.reactElement,
)!;
return finalizedApp.element;
}