Package Exports
- inferno-vnode-flags
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 (inferno-vnode-flags) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
inferno-vnode-flags
Inferno VNode Flags is a small utility library for Inferno.
Usage of inferno-vnode-flags should be limited to assigning VNodeFlags when using Inferno.createVNode.
Install
npm install --save inferno-vnode-flagsContents
VNodeFlags.TextVNodeFlags.HtmlElementVNodeFlags.ComponentClassVNodeFlags.ComponentFunctionVNodeFlags.ComponentUnknownVNodeFlags.HasKeyedChildrenVNodeFlags.HasNonKeyedChildrenVNodeFlags.SvgElementVNodeFlags.MediaElementVNodeFlags.InputElementVNodeFlags.TextareaElementVNodeFlags.SelectElementVNodeFlags.Void
You can easily combine multiple flags, by using bitwise operators. A common use case is an element that has keyed children:
const flag = VNodeFlags.HtmlElement | VNodeFlags.HasKeyedChildren;Example Usage
import Inferno from 'inferno';
import VNodeFlags from 'inferno-vnode-flags';
const vNode = Inferno.createVNode(VNodeFlags.Element, 'div', { className: 'example' }, 'Hello world!');
Inferno.render(vNode, container);