title: React / Redux - is a function prop for deferred state loading in mapStateToProps bad?
body: <p>This is my component:</p>
  
  <pre><code>import React, { Component } from "react";
  import PropTypes from "prop-types";
  import { connect } from "react-redux";
  import { Divider } from "antd";
  import MovieList from "../components/MovieList";
  import IncreaseCountButton from "../components/IncreaseCountButton";
  import DeleteButton from "../components/DeleteButton";
  import { deleteMovie, increaseCount } from "../actions/movies";
  import { getIsDeleting, getIsIncreasing } from "../reducers/actions";
  
  export class MovieListContainer extends Component {
    constructor(props) {
      super(props);
      this.handleIncrease = this.handleIncrease.bind(this);
      this.handleDelete = this.handleDelete.bind(this);
    }
  
    static propTypes = {
      isIncreasing: PropTypes.func.isRequired,
      isDeleting: PropTypes.func.isRequired,
    };
  
    async handleIncrease(movie) {
      await this.props.increaseCount(movie, this.props.token);
    }
  
    async handleDelete(movie) {
      await this.props.deleteMovie(movie.id, this.props.token);
    }
  
    render() {
      return (
        &lt;MovieList movies={this.props.movies}&gt;
          {(text, movie) =&gt; (
            &lt;div&gt;
              &lt;IncreaseCountButton
                onIncrease={() =&gt; this.handleIncrease(movie)}
                loading={this.props.isIncreasing(movie.id)}
              /&gt;
              &lt;Divider type="vertical" /&gt;
              &lt;DeleteButton
                onDelete={() =&gt; this.handleDelete(movie)}
                loading={this.props.isDeleting(movie.id)}
              /&gt;
            &lt;/div&gt;
          )}
        &lt;/MovieList&gt;
      );
    }
  }
  
  export const mapStateToProps = state =&gt; ({
    isIncreasing: id =&gt; getIsIncreasing(state, id),
    isDeleting: id =&gt; getIsDeleting(state, id),
  });
  
  export default connect(
    mapStateToProps,
    { deleteMovie, increaseCount }
  )(MovieListContainer);
  </code></pre>
  
  <p>I feel like this might be bad for performance/reconciliation reasons, but not sure how else to retrieve the state in a way that hides implementation details.</p>
  
  <p>Gist link: <a href="https://gist.github.com/vitalicwow/140c06a52dd9e2e062b2917f5c741727" rel="nofollow noreferrer">https://gist.github.com/vitalicwow/140c06a52dd9e2e062b2917f5c741727</a></p>
  
  <p>Any help is appreciated.</p>