There seems to be no true IPT equivalent of oneOf, which is problematic if you want to check that a prop is an exact match for an immutable map that exists in a constant immutable list.
const COUNTRIES = [
{...},
{...},
{...},
{...},
{...},
{...},
];
const IMMUTABLE_COUNTRIES = Immutable.fromJS(
COUNTRIES
);
var countryShapeImmutable = React.PropTypes.oneOf(
IMMUTABLE_COUNTRIES // fails
);
ExceptionsManager.js:71Warning: Invalid argument supplied to oneOf, expected an instance of array.
Is there a way to check for a specific immutable country here, using immutable proptypes?
There seems to be no true IPT equivalent of
oneOf, which is problematic if you want to check that a prop is an exact match for an immutable map that exists in a constant immutable list.ExceptionsManager.js:71Warning: Invalid argument supplied to oneOf, expected an instance of array.
Is there a way to check for a specific immutable country here, using immutable proptypes?