JSPM

  • Created
  • Published
  • Downloads 15684
  • Score
    100M100P100Q158434F
  • License MIT

provides helper function to clone Inferno's vNodes

Package Exports

  • inferno-clone-vnode
  • inferno-clone-vnode/dist/index.dev.mjs
  • inferno-clone-vnode/dist/index.mjs

Readme

Inferno-clone-vnode

This package can be used to clone Inferno virtual nodes. This package can also be aliased to React.cloneElement.

import { cloneVNode } from 'inferno-clone-vnode';

const cloned = cloneVNode(
  vNode,
  [props],
  [...children]
)

Clone and return a new Inferno vNode using element as the starting point. The resulting element will have the original element’s props with the new props merged in shallowly. New children will replace existing children. key and ref from the original element will be preserved.