Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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() {
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)
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;
}