@modular-component/core
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

@modular-component/core

Core system for creating a ModularComponent factory. Exports the modularFactory builder, and necessary types for creating extensions.

Installation and usage

yarn add @modular-component/core
// Usage in apps
import { ModularComponent, render } from '@modular-component/core'

const MyComponent = ModularComponent().with(
  render(() => <div>Hello Modular!</div>),
)
// Usage in extensions
import { ModularStage } from '@modular-component/core'

export function extension(): ModularStage<'field', () => void> {
  return { field: 'field', useStage: () => {} }
}

Learn more

Read the ModularComponent ReadMe for more information about the ModularComponent system.

Package Sidebar

Install

npm i @modular-component/core

Weekly Downloads

1

Version

0.2.3

License

MIT

Unpacked Size

17.9 kB

Total Files

9

Last publish

Collaborators

  • jvdsande