title: Using single Redux reducer to get and store multiple results
body: <p>I am wanting to use Redux to perform multiple dispatches to the same endpoint to fetch different responses, however I am unsure of how I can best store them within the Redux store...</p>
  <p><strong>myAction.js</strong></p>
  <pre><code>export const GET_DATA = 'GET_DATA';
  export const GET_DATA_SUCCESS = 'GET_DATA_SUCCESS';
  export const GET_DATA_ERROR = 'GET_DATA_ERROR';
  
  export const getData = (path) =&gt; ({
      type: GET_DATA,
      agent: agent.getData.get,
      agentData: path
  });
  </code></pre>
  <p><strong>myReducer.js</strong></p>
  <pre><code>export default (state = {}, action) =&gt; {
      ...
  
      switch (action.type) {
          ...
  
          case GET_DATA_SUCCESS:
              newState = action.payload;
              break;
  
          ...
  
  </code></pre>
  <p>I will call the API like so:</p>
  <pre><code>const mapDispatchToProps = dispatch =&gt; {
    getData: path =&gt; getData(path);
  }
  
  ...
  
  // Using dispatch
  getData('/myDataPath');
  </code></pre>
  <p><strong>agent.js</strong></p>
  <pre><code>...
  
  getData : {
      get = path =&gt; performGet('https://my.url/data' + path);
  }
  </code></pre>
  <p>Now I know this works perfectly fine for performing a single GET to the endpoint and storing in Redux store under a single entry.</p>
  <p>Is there a way in which I can store multiple responses in the Redux store entry?</p>