Tiny size: 7KB (gzip)
This project is still under develop.
Please don't use in production projects.
Installation
npm install --save doz
Example
<div id="app"></div>
Component definition
Doz.component('button-counter', {
props: {
counter: 0
},
template: function() {
return `
<div>
<button onclick="this.click()">${this.props.title}</button>
<span class="counter">${this.props.counter}</span>
</div>
`
},
click: function() {
this.props.counter += 1;
}
});
Make a view with the component defined above
new Doz({
root: '#app',
template: `
<button-counter title="Click me!"></button-counter>
`
});
Demo
Try now