Skip to content

Commit

Permalink
Simplify dispatch to props
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jan 17, 2018
1 parent 300d986 commit f61c0a3
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions editor/components/block-list/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,7 @@ class BlockListShortcuts extends Component {
}
}

export default connect(
null,
( dispatch ) => ( {
onReplace( uids, blocks ) {
dispatch( replaceBlocks( uids, blocks ) );
},
onChange( uid, attributes ) {
dispatch( updateBlockAttributes( uid, attributes ) );
},
} )
)( BlockListShortcuts );
export default connect( null, {
onReplace: replaceBlocks,
onChange: updateBlockAttributes,
} )( BlockListShortcuts );

0 comments on commit f61c0a3

Please sign in to comment.