I have a component that expects propType oneOfType bool or object so I wrote:
processInfoValues: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.object,
])
which is working fine, my problem is that this prop should be required, how can I achieve that?
I tried like that:
processInfoValues: PropTypes.oneOfType([
PropTypes.bool.isRequired,
PropTypes.object.isRequired,
])
and I keep getting this error:
propType "processInfoValues" is not required, but has no corresponding defaultProps declaration
What am I doing wrong?