Almost like writing in VanillaJS. For modern browser.
Documentation | API | Demo | Browse example code
๐ SEE A PROJECT BUILT WITH DOZ ๐
Look at the code on Codepen
- ๐ผ Works with tagged template literals
- ๐ณ Component based
- ๐งฉ WebComponent ready
- ๐ช Global stores
- ๐ Global components
- ๐ซ Fast performance
- ๐ Scoped style
- ๐ก Uses ES6 proxy to observe changes
- ๐ Simple and familiar API
- ๐ฑโ No extra syntax like JSX
- ๐ฃ No confusion with props and state
- โ Extensible through: plugins, mixin, components
- ๐ฝ CSS animation support
$ 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);
- ๐จ๐ปโ๐ป doz-cli provides a boilerplate to creating app and component
- ๐จ๐ผโ๐จ doz-ssr server side rendering
- ๐คณ๐ผ doz-snap transforms app to static HTML
- ๐ฉ๐ผโ๐ doz-router a complete component for routing
- โ๐ผ doz-metatag a plugin for managing basic OG meta tag in your app (perfect with doz-ssr)
<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