Composable snabbdom virtual-nodes using tagged template strings
This project uses node and npm. Go check them out if you don't have them locally installed.
$ npm install --save snabbx
import {html, render} from 'snabbx'
const app = html`<h1>Hello world!</h1>`
render(document.getElementById('app'), app)
Create a virtual node.
Parameters
template
string HTML template.
Examples
html`
<div>
<p>Hey <span class="span">There</span></p>
<div></div>
dom
<div>
`
Returns Object a virtual node.
Make the diff of two virtual node and render them.
Parameters
Examples
const oldNode = html`
<div>
<p>Hey <span class="span">There</span></p>
<div></div>
dom
<div>
`
const newNode = html`
<div>
Hello
<div>
`
render(oldNode, newNode)
See the contributing file.