UNPKG

nexora

Version:

A lightweight, production-ready JavaScript library for building user interfaces, supporting JSX.

17 lines (16 loc) 463 B
/** * Find the DOM node for a VNode * @description - This function is used to find the DOM node for a VNode. * @param vnode - The VNode to find the DOM node for * @returns The DOM node for the VNode or null if the VNode does not have a DOM node */ export function findDom(vnode) { if (!vnode) return null; if (vnode._dom) return vnode._dom; if (vnode._rendered) { return findDom(vnode._rendered); } return null; }