import React from 'react'; import { createRoot, type Root } from 'react-dom/client'; import { waitForWu } from 'wu-framework/adapters/shared'; import App from './App.tsx'; const wu = await waitForWu(); let root: Root | undefined; wu.define('mi-plataforma', { mount(container, context) { if (!context?.wu) throw new Error('Esta app necesita el contexto de WU.'); root = createRoot(container); root.render(); }, unmount() { root?.unmount(); root = undefined; }, });