asnow
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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')

Readme

Keywords

none

Package Sidebar

Install

npm i asnow

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

68.9 kB

Total Files

13

Last publish

Collaborators

  • tingyuan