From 50e78407b0b76ca1fbd7c367a40292e9a5076eda Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 20 Mar 2017 17:43:58 +0000 Subject: [PATCH] Use mapDispatchToProps object shorthand. --- js/components/ActionButtons.js | 8 +++----- js/components/Character.js | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/js/components/ActionButtons.js b/js/components/ActionButtons.js index 23d42087..726e0981 100644 --- a/js/components/ActionButtons.js +++ b/js/components/ActionButtons.js @@ -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); diff --git a/js/components/Character.js b/js/components/Character.js index 09bb6adc..91fedda0 100644 --- a/js/components/Character.js +++ b/js/components/Character.js @@ -21,4 +21,3 @@ Character.propTypes = { }; export default Character; -// TODO: Require that props.children be a string