title: How to map multiple states to props by using Redux in React?
body: <p>I'm kind of newbie to react and I'm trying to fetch data from a couple of actions - in one component, so my goal is to do this :</p>
  
  <p>Suppose I have a component name 
  Inside it I want to do this : </p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>componentWillMount() {
      this.props.fetchGenres();
      this.props.fetchMovies();
  }
  </code></pre>
  
  <p>And in the export area :</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>AllMovies.propTypes = {
    fetchMovies: propTypes.func.isRequired,
    fetchGenres: propTypes.func.isRequired,
    genres: propTypes.array.isRequired,
    movies: propTypes.array.isRequired
  };
  const mapStateToProps = state =&gt; ({
    genres: state.genres,
    movies: state.movies.items,
    newMovie: state.movies.item,
    editedMovie: state.movies.item
  });
  
  export default connect(
    mapStateToProps,
    { fetchMovies, fetchGenres }
  )(AllMovies);
  </code></pre>
  
  <p>If I use only one map in the  "export default connect" , I receive no errors - but when I add another to the connect object- I get errors</p>
  
  <p>So my question is - is this the right way to map multiple states to props?</p>