Skip to content

Instantly share code, notes, and snippets.

View vinnymac's full-sized avatar
🤓

Vincent Taverna vinnymac

🤓
View GitHub Profile
@vinnymac
vinnymac / silenceReactWarning.log
Created February 1, 2023 04:08
React 18 warning
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
@vinnymac
vinnymac / cannotAssignError.log
Created February 1, 2023 04:08
Cannot assign error
TypeError: Cannot assign to read only property 'reload' of object '[object Location]'
@vinnymac
vinnymac / installReact18TestingLibrary.sh
Created February 1, 2023 04:07
React 18 Testing Library Install
yarn remove @testing-library/react-hooks -W && \
yarn add -D @testing-library/react@latest -W
@vinnymac
vinnymac / tsc-output.log
Created February 1, 2023 04:06
TypeScript output
Found 342 errors in 196 files.
@vinnymac
vinnymac / circular-json-error.log
Last active February 1, 2023 04:18
Circular JSON error
TypeError: Converting circular structure to JSON
@vinnymac
vinnymac / react-18-codemod.sh
Created February 1, 2023 04:04
React 18 Codemod
# To run a particular React 18 code mod, e.g. `context-any`
npx types-react-codemod [codemod] [path-to-sg-root] [path-to-sg-next]
# Or if you prefer you can use the React 18 preset to run all mods
npx types-react-codemod preset-18 [path-to-sg-root] [path-to-sg-next]
@vinnymac
vinnymac / sg-next-deps.diff
Created February 1, 2023 04:03
SG Next Dependency Diff
"devDependencies": {
- "@testing-library/react": "^11.2.7",
- "@testing-library/react-hooks": "^8.0.1",
+ "@testing-library/react": "^13.4.0",
- "@types/react": "^17.0.20",
- "@types/react-dom": "^17.0.9",
- "@types/react-redux": "^7.1.11",
+ "@types/react": "^18.0.24",
+ "@types/react-dom": "^18.0.8",
- "typescript": "4.4.3",
@vinnymac
vinnymac / sg-root-deps.diff
Created February 1, 2023 04:02
SG Root Dependency Diff
"dependencies": {
- "@hot-loader/react-dom": "^17.0.1",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
- "react-redux": "^7.2.4",
+ "react-redux": "^8.0.5",
- "redux-thunk": "^2.3.0",
+ "redux-thunk": "^2.4.2",
@vinnymac
vinnymac / useMemoError.log
Last active February 1, 2023 04:18
React runtime useMemo error
TypeError: Cannot read property 'useMemo' of null
@vinnymac
vinnymac / useStateError.log
Last active February 1, 2023 04:18
React runtime useState error
TypeError: Cannot read property 'useState' of null