Remove createRoot from App component and export App only
cgen-23993868eff84b468bd514bbed828e5d
This commit is contained in:
parent
3b2f04b68b
commit
0f93d4c208
2 changed files with 16 additions and 1 deletions
|
|
@ -111,4 +111,4 @@ const App = () => (
|
|||
</QueryClientProvider>
|
||||
);
|
||||
|
||||
createRoot(document.getElementById("root")!).render(<App />);
|
||||
export default App;
|
||||
|
|
|
|||
15
client/main.tsx
Normal file
15
client/main.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
const container = document.getElementById('root');
|
||||
if (!container) {
|
||||
throw new Error('Root element not found');
|
||||
}
|
||||
|
||||
const root = createRoot(container);
|
||||
root.render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>
|
||||
);
|
||||
Loading…
Reference in a new issue