title: How to dispatch an array from a Reducer
body: <p>This is my reducer code,</p>
  
  <pre><code>export default function homeReducer(state = {}, action){
    switch(action.type){
      case types.GET_USER_DATA_SUCCESS:
        return Object.assign({}, state, action.user);
  
      case types.GET_MEDIA_FOR_USER_SUCCESS:
        return Object.assign({}, state, action.medias);
  
      default:
        return state;
  
  
    }
  }
  </code></pre>
  
  <p>Now user is an object by medias is an array of object.</p>
  
  <p>Now when I pass medias to my component, </p>
  
  <pre><code>function mapStateToProps(state, ownProps){
    return {
      user: state.home,
      medias: state.home
    };
  }
  </code></pre>
  
  <p>I get a validation error, against this code,</p>
  
  <pre><code>HomePage.propTypes = {
  
    user : PropTypes.object.isRequired,
    medias: PropTypes.array.isRequired
  };
  
  Warning: Failed propType: Invalid prop `medias` of type `object` supplied to `HomePage`, expected `array`. Check the render method of `Connect(HomePage)`.
  </code></pre>
  
  <p>I can't seem to understand what I'm doing wrong here.</p>