title: Redux componentDidUpdate get previous state
body: <p>I refactored Redux into my code, but can't figure out how to get the previous state.
  I need this state for my componentDidUpdate lifecycle method so that I can call other methods without getting trapped in an infinite loop.</p>
  
  <pre><code>// when component re-renders
  componentDidUpdate(prevState) {
   // if the current page changes, or the search term changes.
   if(prevState.currentPage !== this.props.bucketlistState.currentPage || 
    prevState.searchTerm !== this.props.bucketlistState.searchTerm) {
    this.getBucketlists();
   }
  }
  </code></pre>