title: React Redux Search Reducer
body: <p>Currently I have the below reducer switch statement. All it does is toggles the state of Sidebar, so first it shows then hides then shows. It's easy. </p>
  
  <pre><code>switch(action.type) {
        case 'SIDEBAR_DISPLAY_TOGGLE':
      return {
        ...state,
        Sidebar : {
          ...state.Sidebar,
          Display : !state.Sidebar.Display
        }
      }
        default:
          return state;
      }
  </code></pre>
  
  <p>Now I have a input field like here
  <a href="https://i.stack.imgur.com/p6wLe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p6wLe.png" alt="enter image description here"></a></p>
  
  <p>that people can type to search account. I am trying to set up Redux so when user types, it gets saved to the Redux global state and I can pull it from another component. I have this reducer code set up for it but I don't know how can I pull what user types into this reducer from that component?</p>
  
  <pre><code> function reducer(state = initialState, action) {
      switch(action.type) {
        case 'ACCOUNT_SEARCH':
          return {
            ...state,
            AccountNumberSearch : {
              ...state.AccountNumberSearch,
              AccountNumber : ''
            }
          }
        default:
          return state;
      }
    }
  }
  </code></pre>