Loading...
Loading...
Error: Only one instance of createRoot can be used per container. This typically happens during HMR or in micro-frontend architectures.React 19 is stricter about root management. If you attempt to call 'createRoot' twice on the same DOM element without unmounting the previous root, React will block the operation to prevent memory leaks and state corruption.
Ensure you only create the root if it hasn't been created yet on the window object or a local variable.
let root;
if (!root) {
root = createRoot(document.getElementById('root'));
}
root.render(<App />);