Bridging hyperscript to InfernoJS
npm install inferno-hyperscript> [Hyperscript][hyperscript] syntax for [Inferno][inferno] termplates.
``javascript
var h = require('inferno-hyperscript');
module.exports = function ExampleComponent(props) {
return h('.example', [
h(
'a.example-link',
{
href: '#',
},
['Hello', props.whom, '!'],
),
]);
};
`
Returns an Inferno VNode from a Hyperscript representation.
- componentOrTag (Object|String) can be an Inferno component OR tag string with optional css class names and ids in the format h1#some-id.foo.bar.id
If a tag string, the tag name is parsed out, and the and className propertires of the properties argument will be modified.(Object)
- properties _(optional)_ An object containing the properties you'd like to set on the element.(Array|String)
- children _(optional)_ An array of h()` children or strings, This will create childen or text nodes respectively.
New in v4.0.0
- noNormalize Boolean _(optional)_ Set true to avoid normalization process. Tells Inferno to trust the input as is. Used for optimization.
[hyperscript]: https://github.com/dominictarr/hyperscript
[inferno]: https://github.com/infernojs/inferno