Latest commit 69fc66d Jan 21, 2017 @Havunen Havunen Inferno 1.2.2
Failed to load latest commit information.
src enabled eslint for packages/*/src and fixed errors Dec 18, 2016 Change all urls to point infernojs/inferno (fixes fe. badges) Dec 30, 2016
package.json Inferno 1.2.2 Jan 21, 2017


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.


npm install --save inferno-vnode-flags


  • VNodeFlags.Text
  • VNodeFlags.HtmlElement
  • VNodeFlags.ComponentClass
  • VNodeFlags.ComponentFunction
  • VNodeFlags.ComponentUnknown
  • VNodeFlags.HasKeyedChildren
  • VNodeFlags.HasNonKeyedChildren
  • VNodeFlags.SvgElement
  • VNodeFlags.MediaElement
  • VNodeFlags.InputElement
  • VNodeFlags.TextareaElement
  • VNodeFlags.SelectElement
  • VNodeFlags.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);