Skip to content

Commit

Permalink
fix: plugin experimental docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Dec 20, 2023
1 parent 25f02a6 commit be215b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/components/Plugin.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Plugin Component

_NOTE:_ This component is experimental and is available for import from `@dhis2/app-runtime/experimental`. The api for this component is not guaranteed to be stable.

A wrapper that creates an iframe for a specified plugin and establishes a two-way communication channel with said plugin, allowing you to pass props (including callbacks between an app and a plugin). Note that the plugin must be built using the app-platform with entryPoints.plugin specified in the d2.config.js file.

## Basic Usage (Defining a plugin within an app)

Within an app you can specify a plugin (either by providing its short name `pluginShortName`, or by specifying a URL directly (`pluginSource`). If you have provided `pluginSource`, this will take precedence (Note: lookup logic is TBD? Should we allow a URL only in development mode, for example?).
Within an app you can specify a plugin (either by providing its short name `pluginShortName`, or by specifying a URL directly (`pluginSource`). If you have provided `pluginSource`, this will take precedence.

```jsx
import { Plugin } from '@dhis2/app-runtime'
import { Plugin } from '@dhis2/app-runtime/experimental'

// within the app
const MyApp = () => (
Expand Down

0 comments on commit be215b2

Please sign in to comment.