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);
Powered by Proxy.
Made with observedAttributes
and attributeChangedCallback
(see MDN).
yarn add jony
or npm i jony