mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-28 04:24:12 +00:00
Use mapDispatchToProps object shorthand.
This commit is contained in:
parent
e8a144984d
commit
50e78407b0
2 changed files with 3 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -21,4 +21,3 @@ Character.propTypes = {
|
|||
};
|
||||
|
||||
export default Character;
|
||||
// TODO: Require that props.children be a string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue