Portals
register Portals components to be rendered in other plugins.
What is a Portal and what can I do with it?
Portal object:
{
id: 'my-awesome-portal',
name: 'My awesome portal',
description: 'A portal component will render an image within a stylish frame',
component: MyPortalComponent
}example
import DashboardPlugin from 'Dashboard/plugin'
const Plugin = new DashboardPlugin('@plugin_bundle')
const registerPlugin = () => {
const { Application } = require('@components/Application')
const { MyAwesomePortal } = require('@components/MyAwesomePortal')
Plugin.register({
application: Application,
portals: [
{
id: 'my-awesome-portal',
name: 'My awesome portal',
description: 'A portal component will render an image within a stylish frame',
component: MyAwesomePortal
}
]
})
}
registerPlugin()
export {
Plugin
}example
How to use a Portal?
example
getPortal
Results:

💁♀️Tips for writing Portals
Last updated