Skip to content

Commit

Permalink
enforced react strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
prabh-t committed May 12, 2024
1 parent 278978c commit 46f9014
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import * as React from "react";
import { createRoot } from "react-dom/client";
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import './styles/index.scss';
import reportWebVitals from './reportWebVitals';

import App from './ui/App';

const container = document.getElementById('root');
if (!container) throw new Error('Failed to find the root element');
const root = createRoot(container);
const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement);
root.render(
<BrowserRouter basename={process.env.PUBLIC_URL}>
<App />
</BrowserRouter>
<React.StrictMode>
<BrowserRouter basename={process.env.PUBLIC_URL}>
<App/>
</BrowserRouter>
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
Expand Down

0 comments on commit 46f9014

Please sign in to comment.