In React I can set default PropTypes like so:
MyComponent.defaultProps = {
multiple: false
}
Now, one of my Props is an associative array. I want to set the default value for one of the key value pars, for example:
ImageMultiCheck.defaultProps = {
multiple: false,
myArray: {label: 'default Value'}
}
This is not working. Maybe its just a syntax mistake. How can I do that?