To switch a project to React 18, there are generally three changes that need to be made.
Update the resolutions in your root package.json to the new versions of @types/react and @types/react-dom:
"resolutions": {
"@types/react": "^18",
"@types/react-dom": "^18",
},
"dependencies": {
...
"react": "^18.0.2",
"react-dom": "^18.0.2",
...
},
...
import ReactDOM from 'react-dom/client';
...
ReactDOM.createRoot(document.getElementById('root')!).render(<App />);
Once these steps are done you should be able to run your app and see it working as before, except now using React 18.