title: Does getState() from redux thunk changes the actual state
body: <p>I'm retriving a slice of the state with getState() to filter some values from the state in an event handler (before dispatching an action and updating the store with the new state slice) But changing the results from getState seems to change the actual store.</p>
  
  <p>Consider the following:</p>
  
  <pre><code>const filterInPlace = (array, predicate) =&gt; {
      let end = 0;
  
      for (let i = 0; i &lt; array.length; i++) {
          const obj = array[i]
  
          if (predicate(obj)) {
              array[end++] = obj
          }
      }
  
      array.length = end
  }
  //some event handler
  ...
  const forDeletion = new Set([...ids])
  let currentState = getState().home.lists
  filterInPlace(currentState, obj =&gt; !forDeletion.has(obj.rowid))
  dispatch(handleSelectLists(ids)) //Leads to an action and reducer
  </code></pre>
  
  <p>Does getState() changes the store?</p>