Compose is a small and type-safe library that links your javascript to your DOM.
Check the full documentation website
<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"
// ...
}
- Clone this repo
$ git clone [email protected]:willybrauner/compose.git
- Install dependencies with pnpm
$ pnpm install
- Start example dev server
$ npm run example-basic:dev