prop-types

Are propTypes not recommended?

In most cases, propTypes has been superseded by TypeScript. I can’t see any comment from the React team about stopping using propTypes.

However, there is nothing wrong with still using propTypes. There were 16 million weekly downloads of the npm package prop-types (which is where the propTypes have been moved to, now being their own package)

See https://legacy.reactjs.org/blog/2017/04/07/react-v15.5.0.html#new-deprecation-warnings for more information.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments