Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Files

Latest commit

 

History

History
43 lines (32 loc) · 713 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 713 Bytes

Lily.js

This is just my Hobby UI framework, not done by a long shot :P

Example: https://codepen.io/imlinus/pen/abzJwVw

import Lily from '//unpkg.com/lily'
import HelloWorld from './hello-world.js'

class App extends Lily.Component {
  state () {
    return {
      title: 'Hello, World.'
    }
  }

  components () {
    return {
      HelloWorld
    }
  }

  template () {
    const { title } = this.$state

    return /* html */`
      <div>
        <h1>{{ title }}</h1>
        <input model="title" />

        <hello-world></hello-world>
      </div>
    `
  }
}

Lily.mount(App)

Cheers

js-standard-style