Do you want to request a feature or report a bug?
feature
What is the current behavior?
Defining an optional type in propTypes for components make us define the defaultProps as well.
What is the expected behavior?
Set default value during propTypes definition.
MyComponent.propTypes = {
className: PropTypes.string.default('MyClass'),
children: PropTypes.node.isRequired,
};
if the defaultProps property is required internally, it might be generated on fly based on the propTypes
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
N/A
Cheers