JSPM

inferno-vnode-flags

1.0.0-beta44
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 164159
  • Score
    100M100P100Q188644F
  • License MIT

Provides an enum of all possible VNode Flags used when calling Inferno.createVNode

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-flags

Contents

  • 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);