react-proptype-conditional-require
react-proptype-conditional-require copied to clipboard
Conditionally require built-in or custom React proptypes based on other props.
@evcohen You did a great job with this! It's too bad that `prop-types` is in maintenance mode now and won't merge this in. The company I work for went ahead...
It would be awesome if this library was a no-op in production, similar to prop-types: https://github.com/facebook/prop-types/blob/11e45c433f439940a4a6fa280a4464ef449e8943/index.js#L8 The reasoning is two-fold: performance and small builds since webpack/uglify will remove dead-code if...
Thank you very much for this extremely helpful library. I wanted to alert you to a non-critical issue that I noticed after installing the library in my React project (React...
What if the conditional prop is a boolean value with a default value set to `false`? Couldn't get this to work.