title: Get the response from the dispatch - React Redux
body: <p>How can I get a response back from the dispatch action to the component and get the values in the context.</p>
  
  <p>index.jsx : </p>
  
  <pre><code>    componentWillMount() {
          this.context.store.dispatch(getConfigSettings());
      }
  </code></pre>
  
  <p>Dispatch calls :</p>
  
  <pre><code>export function getConfigSettings(params) {
      return (dispatch) =&gt; {
          dispatch(requestConfig());
          admin.getConfig(params,
              (response) =&gt; {
                  return dispatch(receivedConfig(response));
              },
              (error) =&gt; {
                  return dispatch(failedConfig(error));
              }
          );
      };
  }
  
  export function getConfig(params, onSuccess, onFailure) {
      const url = `${process.env}/admin/data`;
      return $.get(url,
          (response) =&gt; {
              onSuccess(response);
          }).fail((error) =&gt; {
          onFailure(error);
      });
  }
  </code></pre>
  
  <p>Reducer : </p>
  
  <pre><code>import {
      request,
      received,
      failed
  } from '../actions/actions';
  
  const defaultState = Immutable.fromJS({
      data: Immutable.fromJS([]),
      loading: true,
      error: false
  });
  
  const reducer = createReducer({
      [request]: (state, res) =&gt; {
          return state.set('loading', true)
              .set('error', false)
      },
      [received]: (state, res) =&gt; {
          return state.set('data', Immutable.fromJS(res))
              .set('loading', false)
              .set('error', false); 
      },
      [failed]: (state, res) =&gt; {
          return state.set('data', Immutable.fromJS({}))
              .set('loading', false)
              .set('error', true)
      }
  }, defaultState);
  
  export default reducer;
  </code></pre>
  
  <p>I have checked the response has the correct value. But how to access that value in the index.jsx
  I have to display those values in the table.</p>