/
githubmirror
/
preact
Обзор
Документация
Войти
/
githubmirror
/
preact
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
compat/client.mjs
24 строки
489 B
Ryan Christian
chore: Silence ESLint
05 май 2024, 18:42
Не верифицирован
05 май 2024, 18:42
41ce33b
Код
Авторство
О чём код?
import { render, hydrate, unmountComponentAtNode } from 'preact/compat'; export function createRoot(container) { return { // eslint-disable-next-line render: function (children) { render(children, container); }, // eslint-disable-next-line unmount: function () { unmountComponentAtNode(container); } }; } export function hydrateRoot(container, children) { hydrate(children, container); return createRoot(container); } export default { createRoot, hydrateRoot };