Package Exports
- hyperrender
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hyperrender) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 = require('hyperrender')
// hyperHTML.wire(obj?) shorthand
render.html`<div>Hello world!</div>`
// render.html shorthand
render`<div>Hello world!</div>`
// hyperHTML.wire({ class: 'test' }) shorthand exposing wire interface
render.html({ class: 'test' })`<div>Hello world!</div>`
// hyperHTML.wire(obj?, 'svg') shorthand
render.svg`
<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 interface
render.svg({ points: [1,2] })`
<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