📝 Commit Details:
This commit is contained in:
19
backend/node_modules/preact/compat/client.js
generated
vendored
Normal file
19
backend/node_modules/preact/compat/client.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
const { render, hydrate, unmountComponentAtNode } = require('preact/compat');
|
||||
|
||||
function createRoot(container) {
|
||||
return {
|
||||
render(children) {
|
||||
render(children, container);
|
||||
},
|
||||
unmount() {
|
||||
unmountComponentAtNode(container);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
exports.createRoot = createRoot;
|
||||
|
||||
exports.hydrateRoot = function(container, children) {
|
||||
hydrate(children, container);
|
||||
return createRoot(container);
|
||||
};
|
Reference in New Issue
Block a user