0.0.2 • Published 4 years ago

asnow v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

asnow

A simple UI library(WIP).

example:

import { render, update } from 'asnow'

class HelloWorld {
  static template = `
  <h2>Hello world</h2>
  `
}

class Counter {
  constructor (props) {
    this.count = props.init || 0
  }
  static components = { HelloWorld }
  static template = `
    <div>
      <hello-world></hello-world>
      Counter: { count } <button @click="onAdd">add</button>
    </div>
  `
  onAdd () {
    update(this, {
      count: this.count + 1
    })
  }
}

render(Counter, '#app')
0.0.2

4 years ago

0.0.1

4 years ago