Socket
Socket
Sign inDemoInstall

inferno-vnode-flags

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inferno-vnode-flags

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


Version published
Weekly downloads
139K
decreased by-1.53%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 29 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc