diff --git a/docs/frontend-system/architecture/20-extensions.md b/docs/frontend-system/architecture/20-extensions.md index e142044d03..02f4ba9d05 100644 --- a/docs/frontend-system/architecture/20-extensions.md +++ b/docs/frontend-system/architecture/20-extensions.md @@ -139,11 +139,9 @@ const extension = createExtension({ // ... output: [coreExtensionData.reactElement.optional()], factory() { - return [ - coreExtensionData.reactElement.optional()( - Math.random() < 0.5 ? : undefined, - ), - ]; + return Math.random() > 0.5 + ? [coreExtensionData.reactElement(
Hello World
)] + : []; }, }); ``` @@ -327,18 +325,12 @@ The `ExtensionBoundary` can be used like the following in an extension: const routableExtension = createExtension({ // ... factory({ config, inputs, node }) { - const ExtensionComponent = lazy(() => - options - .loader({ config, inputs }) - .then(element => ({ default: () => element })), - ); - return [ coreExtensionData.path(config.path), - coreExtensionData.routeRef(options.routeRef), + coreExtensionData.routeRef(myRouteRef), coreExtensionData.reactElement( - + , ), ];