sapcc / juno

Monorepo for the Juno microfrontend framework, microfrontend apps, design system and component library
Apache License 2.0
5 stars 3 forks source link

[greenhouse] set plugins with hardcoded embedded true #477

Closed ArtieReus closed 7 months ago

ArtieReus commented 7 months ago

Plugins have to be loaded with default hardcoded prop embedded true. See utils documentation how to add props. This should be done in the Plugin.jsx and went wrong when switching to the utils lib.

https://assets.juno.qa-de-1.cloud.sap/?__s=(assets~Foverview:(assetName:utils,assetVersion:1.1.4,navItem:%27%27,panelOpened:++,panelTabIndex:+0,tabIndex:+2))

Use the mount function to mount the application. The mount function accepts the following options:

container: the ref to the container element which will host the application options object with the following attributes: name: the name of the application version: the version of the application (default is latest) props: the props to be passed to the application Example using name and version and passing embedded as a prop to the target application:

useEffect(() => {
  if (!mount) return
  mount(app.current, {
    name: "exampleapp",
    version: "latest",
    props: { embedded: true },
  })
}, [mount])