hyperrender
Universal render helper for hyperHTML ✨
Usage
hyperrender
is a drop in replacement for hyperHTML.wire(obj?)
, capable of rendering
templates on both the client and server.
const render = // hyperHTML.wire(obj?) shorthandrenderhtml`<div>Hello world!</div>`// render.html shorthandrender`<div>Hello world!</div>`// hyperHTML.wire({ class: 'test' }) shorthand exposing wire interfacerender`<div>Hello world!</div>` // hyperHTML.wire(obj?, 'svg') shorthandrendersvg` <svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"/> </svg>`// hyperHTML.wire({ points: [1,2] }, 'svg') shorthand exposing wire interfacerender` <svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="100" height="100"/> </svg>`
License
MIT