inferno-hyperscript
v8.2.3
Published
Bridging hyperscript to InfernoJS
Downloads
2,078
Readme
inferno-hyperscript
Hyperscript syntax for Inferno termplates.
Usage
var h = require('inferno-hyperscript');
module.exports = function ExampleComponent(props) {
return h('.example', [
h('a.example-link', {
href: '#'
}, [
'Hello',
props.whom,
'!'
])
]);
};
Documentation
h(componentOrTag, properties, children, noNormalize)
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 formath1#some-id.foo.bar
. If a tag string, the tag name is parsed out, and theid
andclassName
propertires of the properties argument will be modified. - properties
(Object)
(optional) An object containing the properties you'd like to set on the element. - children
(Array|String)
(optional) An array ofh()
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.