Skip to content

lovetingyuan/asnow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple UI library(WIP).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published