You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
import { createVNode, createTextVNode } from './vnode'
/**
* Creates a virtual node representing an element node or text node to be created. This function must be imported into any file that contains JSX. Babel uses this function to convert JSX into JavaScript.
* @typedef {import('./vnode').VNode} VNode
* @param {string | Function} type
* @param {Object.<string, any>} [props]
* @return {VNode}
*/
export function h(type, props, ...children) {
props = props || {}
let node
const tempBox = []
const childNodes = []
let length = children.length
const key = props.key
while (length-- > 0) tempBox.push(children[length])