import Selectors from '../../selectors' ; import { handleMouseOver , handleMouseOut , handleCancelEdit } from '../../actions' ; import { useAppState } from '../../Application' ; import Block , { HOVER_MOUSE_KEY } from './block' ; export default ( properties ) : React . ReactElement => { const { state , dispatch } = useAppState ( ) ; const selectors = Selectors ( state ) ; const blockProperties = { editing : selectors . getEditing ( ) , saving : selectors . getBlockSaving ( ) , hasMouseOver : selectors . hasMouseOver ( HOVER_MOUSE_KEY , properties . block . id ) , onMouseOver : handleMouseOver ( dispatch ) , onMouseOut : handleMouseOut ( dispatch ) , onCancelEdit : handleCancelEdit ( dispatch ) } ; return < Block { ... properties } { ... blockProperties } />; } ;