Creates HTML from mostly-dom VNode
yarn add mostly-html mostly-dom
# or
npm install --save mostly-html mostly-dom
Given a VNode it returns a HTML string
import { div, button, h1 } from 'mostly-dom'
import { toHtml } from 'mostly-html'
const view = (amount: number) =>
div({ className: 'foo' }, [
button({ id: 'increment' }, 'Increment'),
button({ id: 'decrement' }, 'Decrement'),
h1(String(amount))
])
const html = toHtml(view(1))
console.log(html)
// => <div class="foo"><button id="increment">Increment</button><button id="decrement">Decrement</button><h1>1</h1></div>