title: What is the best practice for updating the local variables in redux-thunk after getting the response from api?
body: <p>I have implemented the redux-thunk which works just fine in my react-native application. I have some 'this.counterValue', which value must be updated after getting the response from the api. As api fetch methods are implemented in another actions files, and response is achieved in that file. So, how must it be implemented to make this work fine.I don't want the change in 'this.counterValue' results in re-render of my application. I am new to react native, it would be great to be helped. Thanks.</p>
  
  <p>Component file:</p>
  
  <pre><code>this.counterValue = 75; //local variable
  this.props.fetchData('onStart'); // call to fetch data from actions files
  </code></pre>
  
  <p>Action file:</p>
  
  <pre class="lang-js prettyprint-override"><code>    export const fetchData = (fetchType) =&gt; {
          return async dispatch =&gt; {
  
              dispatch(fetchingDataRequest());
  
              fetch(AllApi),
              {
                  method: 'GET',
                  headers:
                  {
                      'Accept': 'application/json',
                      'Content-Type': 'application/json',
                      'Authorization': 'Bearer '+ global.apiToken,
                  },
  
              })
              .then(response =&gt; {
                  return response.json()
              })
              .then(RetrivedData =&gt; {
                  dispatch(fetchingDataSuccess(RetrivedData.data));
              })
              .catch(error =&gt; {
                  dispatch(fetchingNotificationFailure(error));
              });
          }
      }
  </code></pre>