Use mapDispatchToProps object shorthand.

This commit is contained in:
Jordan Eldredge 2017-03-20 17:43:58 +00:00
parent e8a144984d
commit 50e78407b0
2 changed files with 3 additions and 6 deletions

View file

@ -15,10 +15,8 @@ const ActionButtons = (props) => (
const mapStateToProps = (state) => state.media;
const mapDispatchToProps = (dispatch) => ({
play: () => dispatch(play()),
pause: () => dispatch(pause()),
stop: () => dispatch(stop())
});
const mapDispatchToProps = {
play, pause, stop
};
export default connect(mapStateToProps, mapDispatchToProps)(ActionButtons);

View file

@ -21,4 +21,3 @@ Character.propTypes = {
};
export default Character;
// TODO: Require that props.children be a string