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" />
reapex-plugin-component-registry
1.0.3 • Public • PublishedPackage 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