Skip to content

Commit

Permalink
add StrictMode
Browse files Browse the repository at this point in the history
  • Loading branch information
HristoKolev committed May 13, 2024
1 parent 6fc7f69 commit 3b6372f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion extra/05-react/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

import { App } from './App';
Expand All @@ -6,4 +7,8 @@ import './main.css';

const rootElement = document.getElementById('root')!;

createRoot(rootElement).render(<App />);
createRoot(rootElement).render(
<StrictMode>
<App />
</StrictMode>
);
7 changes: 6 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

import { App } from './App';
Expand All @@ -7,4 +8,8 @@ import './styles.scss';

const rootElement = document.getElementById('root')!;

createRoot(rootElement).render(<App />);
createRoot(rootElement).render(
<StrictMode>
<App />
</StrictMode>
);

0 comments on commit 3b6372f

Please sign in to comment.