Skip to content

Instantly share code, notes, and snippets.

@sravan-s
Created June 29, 2022 01:16
Show Gist options
  • Save sravan-s/7e88d125c7729c5465f7bd88bb92341e to your computer and use it in GitHub Desktop.
Save sravan-s/7e88d125c7729c5465f7bd88bb92341e to your computer and use it in GitHub Desktop.
Downgrade react version manually

To downgrade to react 17

  • Step 1: In package.json, replace react version.
"dependencies": {
...
  "@types/react": "^17.0.39",
  "@types/react-dom": "^17.0.11",
...
  "react": "^17.0.2",
  "react-dom": "^17.0.2",
  • Step 2: Run
  rm -rf node_modules; npm install
  • Step 3 Change src/index.tsx
import ReactDOM from 'react-dom';
...
ReactDOM.render(
    <App />,
  document.getElementById('root')
);

Thanks: facebook/create-react-app#12269 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment