Skip to content

Instantly share code, notes, and snippets.

View jimfranke's full-sized avatar

Jim Franke jimfranke

View GitHub Profile
const h = (type, props, ...children) => ({
type, props, children
});
const render = (newVNode, node, oldVNode, insertIdx) => {
oldVNode = oldVNode || {};
let propValue;
// arrays
return [newVNode].flat(Infinity).map(newVNode => (
// text nodes