How to access state inside Redux reducer?
<p>I have a reducer, and in order to calculate the new state I need data from the action and also data from a part of the state not managed by this reducer.  Specifically, in the reducer I will show below, I need access to the <code>accountDetails.stateOfResidenceId</code> field.</p>

<p><strong>initialState.js:</strong></p>

<pre><code>export default {
    accountDetails: {
        stateOfResidenceId: '',
        accountType: '',
        accountNumber: '',
        product: ''
    },
    forms: {
        blueprints: [

        ]
    }
};
</code></pre>

<p><strong>formsReducer.js:</strong></p>

<pre><code>import * as types from '../constants/actionTypes';
import objectAssign from 'object-assign';
import initialState from './initialState';
import formsHelper from '../utils/FormsHelper';
export default function formsReducer(state = initialState.forms, action) {
  switch (action.type) {
    case types.UPDATE_PRODUCT: {
        //I NEED accountDetails.stateOfResidenceId HERE
        console.log(state);
        const formBlueprints = formsHelper.getFormsByProductId(action.product.id);
        return objectAssign({}, state, {blueprints: formBlueprints});
    }

    default:
      return state;
  }
}
</code></pre>

<p><strong>index.js (root reducer):</strong></p>

<pre><code>import { combineReducers } from 'redux';
import accountDetails from './accountDetailsReducer';
import forms from './formsReducer';

const rootReducer = combineReducers({
    accountDetails,
    forms
});

export default rootReducer;
</code></pre>

<p>How can I access this field?</p>