import { StrictMode } from 'react';
import type { ReactNode } from 'react';
import { createRoot } from 'react-dom/client';
import './app.css';

export function mount(app: ReactNode) {
  const root = document.getElementById('root');
  if (!root) throw new Error('The entry HTML needs an element with id="root".');
  createRoot(root).render(<StrictMode>{app}</StrictMode>);
}
