Skip to content

Commit e262edf

Browse files
author
Brendan Mulholland
committed
Switch to new React render API
Fixes warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
1 parent c8fe7fb commit e262edf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { createRoot } from 'react-dom/client';
12
import * as React from 'react';
2-
import * as ReactDOM from 'react-dom';
33

44
import 'tailwindcss/tailwind.css';
55
import 'nprogress/nprogress.css';
66

77
import { App } from './app';
88

9-
ReactDOM.render(<App />, document.getElementById('gitify'));
9+
const container = document.getElementById('gitify')
10+
const root = createRoot(container);
11+
root.render(<App />);

0 commit comments

Comments
 (0)