JSPM

  • Created
  • Published
  • Downloads 15540
  • Score
    100M100P100Q163559F
  • License MIT

provides helper function to clone Inferno's vNodes

Package Exports

  • inferno-clone-vnode
  • inferno-clone-vnode/dist/index.esm.js
  • inferno-clone-vnode/index.js

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-clone-vnode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.