title: React-redux: mapStateToProps() is not triggered
body: <p>I am trying to write the code to do the following in react and react-redux:<br><br>
  1. User signs in using the sign-in form using e-mail and password.</p>
  
  <p>2. When the info is correct, query the user's information (username, profile picture, etc.) from the database and save them into a Javascript object.</p>
  
  <p>3. Trigger the action to send the object to the reducer.</p>
  
  <p>4. Reducer puts the object into the store.</p>
  
  <p>5. Once the store is updated, return the username and render it to the login page.<br><br>
  I wrote the codes below and using console.log, I see that all the steps until #3 work fine. However, the username is not being returned to the original page. I used mapStateToProps(), and when I console-logged, it is not being called at all. Maybe it is because store is not actually being updated, or because there is something wrong with mapStateToProps() implementation. Can someone look at the codes below and help me out?</p>
  
  <p>Below are the codes:</p>
  
  <p>Signin.js</p>
  
  <pre><code>import React from 'react';
  import './App.css';
  import * as firebase from 'firebase';
  import {connect} from 'react-redux';
  import {actionCreators} from './Store';
  
  let userinfo={}; //To save the info queried by the 'signin' function
  
  const signin = () =&gt; {  
      /*
      Code for querying data from Database. Works fine.
      */
              actionCreators.login(userinfo); // After the query is done, trigger the action to update the store. This one works fine too
   }
  
  function Signin(props) {
      return (
      &lt;div&gt;
       /*
       Component description for signin form
       */
          &lt;button className="login_button" id ="lib" onClick={signin}&gt;Sign in&lt;/button&gt;
          &lt;div&gt;
             Hello, {props.username}! 
          &lt;/div&gt;
      &lt;/div&gt;  
      )
  }
  
  function mapDispatchToProps(dispatch,userinfo) {
      return {
          login: () =&gt; dispatch(actionCreators.login(userinfo))
      }
  }
  
  function mapStateToProps(state) {
      return { 
          username: state.username 
      };
  }
  
  export default connect(mapStateToProps,mapDispatchToProps)(Signin);
  </code></pre>
  
  <p>Store.js // I know this code should be split eventually. Just for the purpose of checking if the logic works.</p>
  
  <pre><code>import {createStore} from 'redux';
  
  const loggedIn="loggedIn";
  
  const login=(obj)=&gt;{
      return {
          type:loggedIn,
          payload:obj
      }
  }
  
  const reducer=(state={},action) =&gt; {
      switch(action.type){
          case loggedIn:
              return Object.assign({},state, action.payload);
          default:
              return state;
      }
  };
  
  const store=createStore(reducer);
  
  export const actionCreators = {
      login,
  };
  
  export default store;
  </code></pre>
  
  <p>Many thanks in advance!!!</p>