@cher-ami/compose
TypeScript icon, indicating that this package has built-in type declarations

0.15.2 • Public • Published

Compose

Compose is a small and type-safe library that links your javascript to your DOM.
⚠️ This library is work in progress, the API is subject to change until the v1.0 release.



Documentation

Check the full documentation website

Preview

<div data-component="App">
  <header data-component="Header"></header>
</div>
import { Component } from "@cher-ami/compose"

class App extends Component {
  static attrName = "App"
  header = this.add(Header)
  mounted() {}
  unmounted() {}
}

class Header extends Component {
  static attrName = "Header"
  // ...
}

Start examples

  • Clone this repo
$ git clone git@github.com:willybrauner/compose.git
  • Install dependencies with pnpm
$ pnpm install
  • Start example dev server
$ npm run example-basic:dev

Credits

© Willy Brauner

Licence

MIT

Package Sidebar

Install

npm i @cher-ami/compose

Weekly Downloads

72

Version

0.15.2

License

MIT

Unpacked Size

358 kB

Total Files

46

Last publish

Collaborators

  • pierregradelet
  • hugolefrant
  • bastiencornier
  • willybe