hypercycle
v7.0.1
Published
A Cycle.js DOM shim for hyperx
Downloads
7
Readme
hypercycle
A Cycle.js shim for hyperx. (It's an awful name, I know, sorry.)
Where Cycle.js uses Snabbdom for its DOM driver and hyperx does not work with Snabbdom out of the box, this module translates what hyperx wants into something that Snabbdom can use. The result is a function that can be used to write HTML inside a template literal and get back the corresponding vdom tree.
API
This module exports but a single function:
const {html} = require(`hypercycle`);
const vdom = html`<div>This is some HTML showing that 3 + 4 is ${3 + 4}</div>`;
See hyperx's documentation for more examples.