title: Passing multiple actions to mapDispatchToProps in Redux
body: <p>I have 3 actions I am trying to use in this component. One logs me out of Firebase Google Auth (working correctly), and the other two are simply changing a piece of state to a certain string which I am going to use later to determine what component to render.</p>
  
  <p>The commented out mapDispatchToProps works fine and it's how I'm used to writing it, the one using the logout method is the syntax I can't figure out. How can I refactor the below so that setRoutines and setExercises work?</p>
  
  <p>The component:</p>
  
  <pre><code>import React from 'react';
  
  import { connect } from "react-redux";
  import { firebaseLogout } from '../Auth/Auth.actions';
  import { setRoutines, setExercises } from './Profile.actions';
  
  const Profile = ({logout, setRoutines, setExercises}) =&gt; (
      &lt;React.Fragment&gt;
          &lt;button onClick={setRoutines}&gt;My Routines&lt;/button&gt;
          &lt;button onClick={setExercises}&gt;My Exercises&lt;/button&gt;
          &lt;button onClick={logout}&gt;Logout&lt;/button&gt;
      &lt;/React.Fragment&gt;
  );
  
  const mapDispatchToProps = (dispatch) =&gt; ({
      logout: () =&gt; dispatch(firebaseLogout()),
      setRoutines,
      setExercises,
  });
  
  // const mapDispatchToProps = {
  //     setRoutines,
  //     setExercises
  // };
  
  export default connect(
    undefined,
    mapDispatchToProps
  )(Profile);
  </code></pre>
  
  <p>My actions file:</p>
  
  <pre><code>export const setRoutines = () =&gt; ({
      type: "SET_ROUTINES",
      payload: "routines"
  });
  export const setExercises = () =&gt; ({
      type: "SET_EXERCISES",
      payload: "exercises"
  });
  
  export const logout = () =&gt; ({
      type: 'LOGOUT'
  });
  
  export const firebaseLogout = () =&gt; {
      return () =&gt; {
          return firebase.auth().signOut();
      }
  };
  </code></pre>
  
  <p>My reducer file:</p>
  
  <pre><code>export default (state = {view:'routines'}, action) =&gt; {
      switch (action.type) {
          case 'SET_ROUTINES':
              return {
                  ...state,
                  view: action.payload
              };
  
          case 'SET_EXERCISES':
              return {
                  ...state,
                  view: action.payload
              };
  
          case 'LOGOUT':
              return {};
  
          default:
              return state;
      }
  };
  </code></pre>