facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

Expose PropTypes API for manual use in production code #270

Closed vitalif closed 5 years ago

vitalif commented 5 years ago

Hi, PropTypes is actually a very compact and convenient type checker, so it could be useful to use it in production code, for example, to validate user input. But currently it contains checks explicitly preventing it from being used like that. Could you please remove these checks or make a separate build/library for that?

ljharb commented 5 years ago

Seems related to #34.

You can use the development build in production; see the docs added in #262, also in the readme.