# inferno-hyperx

> Create composable DOM elements by using tagged template strings with [inferno](https://www.npmjs.com/package/inferno)

Latest version **1.0.0** (published 2016-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install inferno-hyperx
pnpm add inferno-hyperx
yarn add inferno-hyperx
bun add inferno-hyperx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-05-27 |
| First published | 2016-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nlocnila |
| Maintainers | nlocnila |

## Links

- npm: https://www.npmjs.com/package/inferno-hyperx
- npm.io page: https://npm.io/package/inferno-hyperx

## Dependencies (2)

- [hyperx](https://npm.io/package/hyperx.md) ^2.0.3
- [inferno-create-element](https://npm.io/package/inferno-create-element.md) ^0.7.7

## Recent versions

- 1.0.0 (latest) — 2016-05-27

## README

# inferno-hyperx

Create composable DOM elements by using tagged template strings with [inferno](https://www.npmjs.com/package/inferno)

## Why

- Provides an alternative to JSX
- Easy to render on both client and server (isomorphic)
- Easy to read and understand

## Install

    $ npm install inferno-hyperx

## Usage

Server:
```javascript
var T = require('../index')
var toString = require('inferno-server').renderToString
var assert = require('assert')

var message = 'h1 has rendered!'

var onCreated = function (domNode) {
  console.log('hook will only be called when rendered on DOM')
}

var heading = T`<h1 onCreated=${onCreated}>${ message }</h1>`

assert.equal(toString(heading), '<h1>h1 has rendered!</h1>')
```

Client:
```javascript
'use strict'

var T = require('../index')
var InfernoDOM = require('inferno-dom')
var document = require('global/document')
var assert = require('assert')

var message = 'h1 has rendered!'

// Example use of hook
var onCreated = function (domNode) {
  assert(domNode, 'domNode is undefined')
  console.log('onCreated triggered')
}

var heading = T`<h1 onCreated=${onCreated}>${ message }</h1>`

InfernoDOM.render(heading, document.body)
```

## License
MIT

---
_Source: https://npm.io/package/inferno-hyperx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
