title: PropTypes: array of one of the class instance
body: <p>I am trying to give a type to one of my properties 'listOfItems'. I want this property to be an array of either instance of class 'Event' or instance of class 'Venue'. This is how I have implemented it:</p>
  
  <pre><code>MyClass.propTypes = {
   ...,
   listOfItems: PropTypes.arrayOf(PropTypes.oneOfType([
     PropTypes.instanceOf(Event),
     PropTypes.instanceOf(Venue)
  ]))
  </code></pre>
  
  <p>}</p>
  
  <p>However, it doesn't seem to be working. I receive this warning: Failed prop type: Invalid prop <code>listOfItems[0]</code> of value <code>[object Object]</code> supplied to <code>MyClass</code>, expected one of [null,null].</p>
  
  <p>I don't want to use PropTypes.shape to define array elements, as I will get quite an extended list of shape properties. This is what I mean:</p>
  
  <pre><code>MyClass.propTypes = {
   ...,
   listOfItems: PropTypes.arrayOf(PropTypes.shape({
    ... //list of properties
   }))
  }
  </code></pre>
  
  <p>Please share your thought <strong>how would you define an array of objects with certain properties</strong> without writing each property of an object.</p>