How to use the inferno-vnode-flags.ComponentClass function in inferno-vnode-flags

To help you get started, we’ve selected a few inferno-vnode-flags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github infernojs / inferno / packages / inferno-create-element / __benchmarks__ / classcomponents.js View on Github external
benchmark('single component', function() {
		class Com extends Component {
			render() {
				return createVNode(InfernoVNodeFlags.Element, 'div', null, '1');
			}
		}

		render(createVNode(InfernoVNodeFlags.ComponentClass, Com), this.testDiv);
	}, {
		setup: function() {
github infernojs / inferno / packages / inferno-create-element / __benchmarks__ / classcomponents.js View on Github external
foo: 'bar',
					daa: 'jaa',
					c: 'g'
				});
			}

			render() {
				return createVNode(InfernoVNodeFlags.Element, 'div', this.props.children, '1');
			}
		}

		render(createVNode(InfernoVNodeFlags.ComponentClass, Com, null, [
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com),
			createVNode(InfernoVNodeFlags.ComponentClass, Com)
github infernojs / inferno / packages / inferno / src / DOM / recycling.ts View on Github external
const key = vNode.key;
		const pool = key === null ? pools.nonKeyed : pools.keyed.get(key);

		if (!isUndefined(pool)) {
			const recycledVNode = pool.pop();

			if (!isUndefined(recycledVNode)) {
				const flags = vNode.flags;
				const failed = patchComponent(
					recycledVNode,
					vNode,
					null,
					lifecycle,
					context,
					isSVG,
					(flags & VNodeFlags.ComponentClass) > 0,
					true
				);

				if (!failed) {
					return vNode.dom;
				}
			}
		}
	}
	return null;
}