/
githubmirror
/
preact
Обзор
Документация
Войти
/
githubmirror
/
preact
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
compat/src/portals.js
12 строк
444 B
Jovi De Croock
Support createPortal in core
18 июл 2026, 08:59
18 июл 2026, 08:59
ec0a288
Код
Авторство
О чём код?
import { createPortal as corePortal } from 'preact'; /** * Create a `Portal` to continue rendering the vnode tree at a different DOM node * @param {import('./internal').VNode} vnode The vnode to render * @param {import('./internal').PreactElement} container The DOM node to continue rendering in to. */ export function createPortal(vnode, container) { const el = corePortal(vnode, container); el.containerInfo = container; return el; }