Skip to content

Commit

Permalink
upgrade to react
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Apr 26, 2024
1 parent 1139a6c commit 6cb7c93
Show file tree
Hide file tree
Showing 25 changed files with 327 additions and 248 deletions.
52 changes: 26 additions & 26 deletions epicshop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
/** @type {import('@types/eslint').Linter.Config} */
export default {
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
languageOptions: { parser: await import('@typescript-eslint/parser') },
plugins: {
'@typescript-eslint': (await import('@typescript-eslint/eslint-plugin'))
.default,
'react-hooks': (await import('eslint-plugin-react-hooks')).default,
import: (await import('eslint-plugin-import')).default,
},
rules: {
// playwright requires destructuring in fixtures even if you don't use anything 🤷‍♂️
'no-empty-pattern': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',

'@typescript-eslint/consistent-type-imports': [
'warn',
{
Expand Down
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/01.problem.lazy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -21,12 +21,16 @@
"@total-typescript/ts-reset": "^0.5.1",
"@types/d3-geo": "^3.1.0",
"@types/node": "^20.9.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@types/topojson-client": "^3.1.4",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/01.solution.lazy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -22,11 +22,15 @@
"@types/d3-geo": "^3.1.0",
"@types/topojson-client": "^3.1.4",
"@types/node": "^20.9.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/02.problem.eager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -22,11 +22,15 @@
"@types/d3-geo": "^3.1.0",
"@types/node": "^20.9.1",
"@types/topojson-client": "^3.1.4",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/02.solution.eager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -22,11 +22,15 @@
"@types/d3-geo": "^3.1.0",
"@types/node": "^20.9.1",
"@types/topojson-client": "^3.1.4",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/03.problem.transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -22,11 +22,15 @@
"@types/d3-geo": "^3.1.0",
"@types/node": "^20.9.1",
"@types/topojson-client": "^3.1.4",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/04.code-splitting/03.solution.transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"dependencies": {
"@use-gesture/react": "^10.3.0",
"d3-geo": "^3.1.0",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"react-spring": "^9.7.3",
"spin-delay": "^2.0.0",
"topojson-client": "^3.1.0"
Expand All @@ -22,11 +22,15 @@
"@types/d3-geo": "^3.1.0",
"@types/node": "^20.9.1",
"@types/topojson-client": "^3.1.4",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/05.calculations/01.problem.use-memo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
"comlink": "^4.4.1",
"downshift": "^8.3.2",
"match-sorter": "^6.3.4",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"spin-delay": "^2.0.0"
},
"devDependencies": {
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.9.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/05.calculations/01.solution.use-memo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
"comlink": "^4.4.1",
"downshift": "^8.3.2",
"match-sorter": "^6.3.4",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"spin-delay": "^2.0.0"
},
"devDependencies": {
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.9.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
12 changes: 8 additions & 4 deletions exercises/05.calculations/02.problem.worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
"comlink": "^4.4.1",
"downshift": "^8.3.2",
"match-sorter": "^6.3.4",
"react": "18.3.0-canary-a870b2d54-20240314",
"react-dom": "18.3.0-canary-a870b2d54-20240314",
"react": "19.0.0-beta-94eed63c49-20240425",
"react-dom": "19.0.0-beta-94eed63c49-20240425",
"spin-delay": "^2.0.0"
},
"devDependencies": {
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.9.1",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.3",
"typescript": "^5.0.2",
"vite": "^5.2.10"
},
"overrides": {
"@types/react": "$@types/react",
"@types/react-dom": "$@types/react-dom"
}
}
Loading

0 comments on commit 6cb7c93

Please sign in to comment.