I see that another developer is using oneOfType like this:
size: PropTypes.oneOfType([PropTypes.object]).isRequired,
It doesn't seem right to me. The way I understand oneOfType is that the prop should be one of a specified set of types like the example bellow:
size: PropTypes.oneOfType([
PropTypes.object,
PropTypes.number
]).isRequired,
However,
size: PropTypes.oneOfType([PropTypes.object]).isRequired,
doesn't throw any linting errors and everything seems to be working fine.
Can I leave it as it is?