Nothing works, I dont understand modern javascript
This commit is contained in:
parent
72666e9258
commit
d5cf369a75
139 changed files with 10138 additions and 55 deletions
22
crates/librqbit/webui/node_modules/preact/compat/client.mjs
generated
vendored
Normal file
22
crates/librqbit/webui/node_modules/preact/compat/client.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { render, hydrate, unmountComponentAtNode } from 'preact/compat';
|
||||
|
||||
export function createRoot(container) {
|
||||
return {
|
||||
render(children) {
|
||||
render(children, container);
|
||||
},
|
||||
unmount() {
|
||||
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