title: Dispatch not changing redux state
body: <p>I am fairly new to redux, and I am running into a problem.</p>
  
  <p>I am trying to implement flash messages to my login page, but redux's dispatch is not changing the UI State. </p>
  
  <p>I want a flash message to appear on the login page after user successfully register. </p>
  
  <pre><code>//login.js
  
  class Login extends Component{
      renderMessage() {
          if (this.props.flashMessageType== "registrationComplete"){
              return (
                  &lt;Message
                      style={{textAlign: "left"}}
                      success
                      icon="check circle"
                      header="Account Registration was Successful"
                      list={["You must verify your email before logging in"]}
                  /&gt;
              );
          } else {
              return (null);
          }
      }
  
      render() {
          return ({
              this.renderMessage()
          });
      }
  }
  
  
  function mapStateToProps(state) {
      return {
          flashMessageType:state.flashMessage.flashType,
      };
  }
  
  
  export default connect(mapStateToProps, actions)(Login);
  </code></pre>
  
  <p>Here is the reducer</p>
  
  <pre><code>const initialState = {
      flashType: "",
  };
  
  export default function(state = {initialState}, action){
      switch(action.type){
          case USER_REGISTER:
              return [
                  ...state,
                  {
                      flashType:"registrationComplete"
                  }
              ];
          default:
              return initialState;
      }
  }
  </code></pre>
  
  <p>and here is the actions</p>
  
  <pre><code>export const submitForm = (values,history) =&gt; async dispatch =&gt; {
      const res = await axios.post('/api/signup', values);
      history.push('/');
      dispatch({type: FETCH_USER, payload: res.data});
      dispatch({type: USER_REGISTER});
  };
  </code></pre>
  
  <p>I appreciate your help. </p>
  
  <p>Thanks,</p>
  
  <p>Vincent</p>