Skip to content

Commit 2b55997

Browse files
committed
remove prop types
1 parent cd75a49 commit 2b55997

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

.eslintrc.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ module.exports = {
1212
rules: {
1313
'no-unused-vars': 'off',
1414
'@typescript-eslint/no-unused-vars': 'off',
15+
'prefer-const': 'off',
1516
},
1617
}

package-lock.json

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"mobx": "^6.3.13",
2727
"mobx-react": "^7.2.1",
2828
"mobx-react-lite": "^3.2.3",
29-
"prop-types": "^15.8.1",
3029
"react": "^19.0.0-beta-1beb73de0f-20240503",
3130
"react-dom": "^19.0.0-beta-1beb73de0f-20240503",
3231
"react-hook-form": "^7.48.2",
@@ -43,14 +42,14 @@
4342
"@types/react-dom": "npm:types-react-dom@beta"
4443
},
4544
"devDependencies": {
45+
"@testing-library/jest-dom": "^5.16.2",
46+
"@testing-library/react": "^13.1.1",
4647
"@types/concurrently": "^6.4.0",
48+
"@types/jest": "^27.4.0",
4749
"@types/react": "npm:types-react@beta",
4850
"@types/react-dom": "npm:types-react-dom@beta",
4951
"@types/readline-sync": "^1.4.8",
5052
"@types/shelljs": "^0.8.15",
51-
"@testing-library/jest-dom": "^5.16.2",
52-
"@testing-library/react": "^13.1.1",
53-
"@types/jest": "^27.4.0",
5453
"@typescript-eslint/eslint-plugin": "^7.2.0",
5554
"@typescript-eslint/parser": "^7.2.0",
5655
"@vitejs/plugin-react": "^4.2.1",

react/core/01-rendering/lecture/examples/Icon.jsx

-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import classnames from 'classnames'
2-
import PropTypes from 'prop-types' // <-- made by the React team
32
import { FaTrashAlt, FaPlus } from 'react-icons/fa'
43
import { AiFillStar } from 'react-icons/ai'
54

@@ -26,10 +25,3 @@ export function Icon({ name, className, size = 1.3, ...rest }) {
2625

2726
return <Component {...rest} {...props} />
2827
}
29-
30-
Icon.propTypes = {
31-
name: PropTypes.string.isRequired,
32-
// name: PropTypes.oneOf(['plus', 'star', 'trash']).isRequired
33-
}
34-
35-
// https://github.com/facebook/prop-types

0 commit comments

Comments
 (0)