react-desc
react-desc copied to clipboard
PropTypes.string.describe is not a function
Following the README instructions to install and use this module results in the following error
TypeError: react_desc__WEBPACK_IMPORTED_MODULE_2__.PropTypes.string.describe is not a function
Reproduction steps
Repro repo: https://github.com/lokimckay-references/react-desc-26
npx create-react-app myapp --use-npmcd myappnpm install react-desc- Create Anchor.js file and copy + paste code snippet found in README
- In
App.js, attempt to access the JSON output as described in readmeimport { AnchorWithSchema } from './Anchor'; const documentation = AnchorWithSchema.toJSON();
Actual result

Expected result
JSON describing Anchor component PropTypes as per README
Versions

"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"react": "^17.0.2",
"react-desc": "^4.1.3",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
},