reapex-plugin-component-registry
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Reapex modal plugin

import { App } from 'reapex'
import registryPlugin from 'reapex-plugin-component-registry'

const app = new App()

// 1. register the plugin
const registry = app.plugin(registryPlugin, '@@registry')

// 2. register a component
const ComponentA: React.FC<{}> = () =>
  <div>
    This is ComponentA A
  </div>

registry.register('ComponentA', ComponentA)

// use the registered component
<registry.Component name="ComponentA" />

Package Sidebar

Install

npm i reapex-plugin-component-registry

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

18.9 kB

Total Files

22

Last publish

Collaborators

  • ruanyu1