Skip to content

apostololeg/jony

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Component Framework

yarn example or npm run example

import h, { html, Component, State } from 'jony';
import '../app-header/app-header';

@State({
  title: 'App'
})
class App extends Component {
  onClick = (e) => {
    this.state.title += ' (updated)';
  }

  render() {
    const { title } = this.state;

    return html`
      <button onclick=${this.onClick}>change title</button>
      <app-header title="${title}" />
    `;
  }
}

export default h('app-root', App);

API

@State

Powered by Proxy.

@Props

Made with observedAttributes and attributeChangedCallback (see MDN).

Installation

yarn add jony or npm i jony

Dependencies

About

web-components framework prototype

Resources

Stars

Watchers

Forks

Packages

No packages published