title: Emptying an Array using ImmutableJs
body: <p>I'm using <a href="https://facebook.github.io/immutable-js" rel="nofollow">ImmutableJS</a> with <a href="http://redux.js.org/" rel="nofollow">Redux</a> and <a href="https://github.com/gajus/redux-immutable" rel="nofollow">redux-immutable</a>. Suppose I have an initial state which is an empty array of items:</p>
  
  <pre><code>const initialState = fromJS({
    items: [],
    other: true,
  });
  </code></pre>
  
  <p>I can than add an item:</p>
  
  <pre><code>case ADD_ITEM:
        return state
        .updateIn(['items'], list =&gt; list.concat({id: 1231}))
        .set('other', false);
  </code></pre>
  
  <p>Afterwards I try to empty the array of items using <code>set</code> or <code>updateIn</code>:</p>
  
  <pre><code>case EMPTY_ARRAY:
            return state
            .updateIn(['items'],[])
            // or
            .set('items', []);
  </code></pre>
  
  <p>When I try to use a <code>state.get('items').toJS()</code> I get an error:</p>
  
  <pre><code>items.get(...).toJS is not a function
  </code></pre>
  
  <p>What is the correct way to empty this nested immutable array?</p>