Remove PropTypes from production build (#209)#3818
Conversation
|
Hmm. I feel like that ESLint rule is too restrictive. It should be perfectly okay to use another component's Button.propTypes = {
...Touchable.propTypes,
color: PropTypes.string
}The message is also not friendly: It should say something like Can you follow up with |
* Remove PropTypes from production build (react#209) * Added react/forbid-foreign-prop-types rule to eslint config * Removed react/forbid-foreign-prop-types rule from eslint config
|
I'm too late on this thread. but what about the scenario that @gaearon mentioned about: ? |
|
I made a PR to |
|
@iansu - thanks for the quick reply. Why about this case: |
|
I'm not sure why you'd be getting the warning in that case. This would need to be addressed in |
Apply
babel-plugin-transform-react-remove-prop-typeswhen building for production.Closes #209