reapex-module-component-registry

1.1.0 • Public • Published

Reapex component registry module

import { App } from 'reapex'
import registryModule from 'reapex-module-component-registry'
 
const app = new App()
 
// 1. register the module
const registry = app.use(registryModule, '@@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-module-component-registry

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

13.6 kB

Total Files

21

Last publish

Collaborators

  • ruanyu1