import React from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { App } from './App';

const root = document.getElementById('root');
const tree = <App initialPath={window.location.pathname} />;
if (root.hasChildNodes()) hydrateRoot(root, tree);
else createRoot(root).render(tree);
