$ npx doz-cli app my-app
$ cd my-app
$ npm start
<div id="app"></div>
ButtonCounter.js
import {Component} from 'doz'
export default class ButtonCounter extends Component {
constructor(o) {
super(o);
this.props = {
counter: 0
};
}
template(h) {
return h`
<style>
button {
font-size: 16px;
padding: 20px;
}
</style>
<button onclick="${this.increase}">
count ${this.props.counter}
</button>
`
}
increase() {
this.props.counter++;
}
};
app.js
import {appCreate} from 'doz'
import ButtonCounter from './ButtonCounter'
appCreate('#app', ButtonCounter);
<script type="module">
import {Component} from 'https://unpkg.com/doz/dist/doz.min.js'
//...
</script>
You can view the changelog here
Doz is open-sourced software licensed under the MIT license