The error "Uncaught TypeError: Cannot read properties of null (reading 'useEffect')" was occurring. This commit addresses the issue.
18 lines
340 B
TypeScript
18 lines
340 B
TypeScript
|
|
import React from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import App from './App.tsx';
|
|
import './index.css';
|
|
|
|
const rootElement = document.getElementById("root");
|
|
|
|
if (!rootElement) {
|
|
throw new Error("Root element not found!");
|
|
}
|
|
|
|
createRoot(rootElement).render(
|
|
<React.StrictMode>
|
|
<App />
|
|
</React.StrictMode>
|
|
);
|