title: Correct way to use immutablejs (toJS and fromJS) with redux
body: <p>I wonder if this is a correct way to use <code>immutable.js</code> with redux and <code>reselect</code> (also <code>redux-saga</code>). Specifically I wonder about <code>toJS()</code> and from <code>fromJS()</code> and where to use them.
  My idea is that:</p>
  
  <ol>
  <li>I use <code>toJS()</code> when sending data to a saga. </li>
  <li>I <strong>do not use</strong> <code>fromJS()</code> in reducer because I think that it is done anyway by the fact that I use <code>fromJS()</code> for initialState.  Or am I wrong about that? </li>
  <li>I use <code>toJS()</code> in selector from <code>reselect</code> so I can use js data in react component. </li>
  </ol>
  
  <p>Example:</p>
  
  <p>1) In my react component I do:</p>
  
  <pre><code>// mapDispatchToProps
     function mapDispatchToProps(dispatch) {
        return {
           loginRequest: values =&gt; dispatch(loginRequest(values)),
        };
     }
  
  // Sending values.toJS() to my redux-saga. 
     submit = values =&gt; {
        this.props.loginRequest(values.toJS());
     };
  </code></pre>
  
  <p>2) In reducer I do (<strong>should</strong> one use <code>fromJS()</code> here or not? According to redux docs you should):</p>
  
  <pre><code>const { fromJS } = require('immutable');
  const state = fromJS({
    pages: {
      usersPage: {
        loading: false,
        isFetched: false,
        list: [],
      }
    }
  });
  function reducer(state, action) {
    switch(action.type) {
      case 'USERS_LOADED':
        return state
          .setIn(['usersPage', 'list'], action.payload) // fromJS() here or not?
          .setIn(['usersPage', 'isFetched'], true)
          .setIn(['usersPage', 'loading'], false)
          ;
      default:
        return state;
    }
  }
  export default reducer;
  </code></pre>
  
  <p>3) In my selector I do <code>toJS()</code> again:</p>
  
  <pre><code>const selectUser = state =&gt; state.get('user', initialState);
  const makeSelectList= () =&gt;
     createSelector(selectUser, userState =&gt; userState.getIn(['usersPage', 
  'list']).toJS());
  
  // Which I then use in my react component:
  const mapStateToProps = createStructuredSelector({
     list: makeSelectList(),
  });
  </code></pre>
  
  <p>So basically I wonder if that is a correct flow of convertion between js and immutable. Or can it be optimized in some way (less convertion steps)? Maybe the above is a non-optimal way of logic?</p>
  
  <p>Best Regards</p>