React: `prop-types` package does not declare `react` as a dep or peer dep.

Created on 8 Apr 2017  Â·  5Comments  Â·  Source: facebook/react

Per https://unpkg.com/[email protected]/index.js, react is a dependency of prop-types.

However, http://npmcdn.com/prop-types/package.json does not list it as either a dependency or a peerDependency. That makes it both an implicit dependency, and one whose version compatibility is unchecked.

Could you add react as a peer dependency, ideally over the entire range of React versions that prop-types works with? I'm particularly interested in if it works on 0.13 and 0.14, I'd want the React peer dep to be ^0.13 || ^0.14 || ^15, for example.

(@acdlite @kentcdodds)

Most helpful comment

Btw prop-types lives here now: https://github.com/reactjs/prop-types

All 5 comments

We should just inline isValidElement so we don't have to.

That would be SO much better,

The only remaining reason airbnb-prop-types depends on React is isValidElement :-)

Done!

Btw prop-types lives here now: https://github.com/reactjs/prop-types

omg separate repo, yay‼ you may want to update the repo field on https://www.npmjs.com/package/prop-types; it still points to this one.

Was this page helpful?
0 / 5 - 0 ratings