title: Use immutable js to set reducer state to returned array
body: <p>I have a simple reducer example:</p>
  
  <pre><code>import { fromJS } from 'immutable'
  import {
    REQUEST_SUCCESS
  } from './constants'
  
  const initialState = fromJS({
    badges: []
  })
  
  function badgesReducer (state = initialState, action) {
    switch (action.type) {
      case REQUEST_SUCCESS:
        return state
          .set('badges', action.payload.badges || [])
      default:
        return state
    }
  }
  
  export default badgesReducer
  </code></pre>
  
  <p>Idea here is to set badges equal to array returned by api response that is within <code>action.payload.badges</code> however I believe I am doing something wrong as I get following error returned:</p>
  
  <blockquote>
    <p>warning.js:44 Warning: Failed prop type: Invalid prop <code>badges</code> of type
    <code>object</code> supplied to <code>Badges</code>, expected <code>array</code></p>
  </blockquote>