react-immutable-proptypes
react-immutable-proptypes copied to clipboard
mapOf(contains()) throws warning
The problem seems like #23 but I'm still seeing it; my propType is:
payments: ImmutablePropTypes.mapOf(
ImmutablePropTypes.contains({
paidDate: PropTypes.oneOfType([
PropTypes.number,
PropTypes.instanceOf(Date),
]).isRequired,
paidAmount: PropTypes.number.isRequired,
}),
PropTypes.number
)
I get the following warning:
Invalid prop `payments[0]` of type `array` supplied to `MyComponent`, expected an Immutable.js Iterable
As mentioned in the aforementioned issue, it seems to be coming from the values being converted to arrays.
My react-immutable-proptypes version is 2.1.0.