You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not an issue, more of a possible request...
One PropType we use often, but is not included in this extension, is the generic : PropTypes.objectOf(PropTypes.shape).isRequired
Not sure if it was a conscious decision or if there is some other reason for not including it.
The text was updated successfully, but these errors were encountered:
Say we have a case where a prop named 'someProp' is equated as :
someProp= {
dynamickey : {
knownKey1: ,
knownKey2:,
and so on
}
}
Here we do not know the type of dynamic key but we know for sure that its value is an object of all known key types.
Thus to define PropTypes for someProp we may do something like this
someProp: PropTypes.objectOf(PropTypes.shape(
{
knownKey: PropTypes.string,
knownKey2:PropTypes.number
and so on
}
))
Not an issue, more of a possible request...
One PropType we use often, but is not included in this extension, is the generic :
PropTypes.objectOf(PropTypes.shape).isRequired
Not sure if it was a conscious decision or if there is some other reason for not including it.
The text was updated successfully, but these errors were encountered: