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

[all Juno apps] fix index.js file with async await to be able to catch errors #518

Open edda opened 5 months ago

edda commented 5 months ago

This is for all Juno apps in the Juno monorepo, as well as the greenhouse apps in the greenhouse and greenhouse-extensions repos.

see example from the clusters app, which it was already changed:

// export mount and unmount functions with async import
export const mount = async (container, options = {}) => {
  await import("./App").then((App) => {
    mount.root = createRoot(container)
    mount.root.render(React.createElement(App.default, options?.props))
  })
}
andypf commented 1 week ago

It is still up-to-date