preact
This commit is contained in:
parent
6acf267d48
commit
b7614eb3f8
4794 changed files with 1280808 additions and 1546 deletions
24
frontend/node_modules/preact/compat/client.mjs
generated
vendored
Normal file
24
frontend/node_modules/preact/compat/client.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
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
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue