- Consolidated duplicate UndoManagers to single instance - Fixed connection promise to only resolve on 'connected' status - Fixed WebSocketProvider import (WebsocketProvider) - Added proper doc.destroy() cleanup - Renamed isPresenceInitialized property to avoid conflict Co-Authored-By: Paperclip <noreply@paperclip.ing>
25 lines
489 B
JavaScript
25 lines
489 B
JavaScript
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
|
|
};
|