File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,8 @@ const Handle = memo(
15
15
...rest
16
16
} : HandleProps ) => {
17
17
const nodeId = useContext ( NodeIdContext ) as ElementId ;
18
- const { setPosition, setSourceId } = useStoreActions ( ( a ) => ( {
19
- setPosition : a . setConnectionPosition ,
20
- setSourceId : a . setConnectionSourceId ,
21
- } ) ) ;
18
+ const setPosition = useStoreActions ( ( a ) => a . setConnectionPosition ) ;
19
+ const setSourceId = useStoreActions ( ( a ) => a . setConnectionSourceId ) ;
22
20
const onConnectAction = useStoreState ( ( s ) => s . onConnect ) ;
23
21
const onConnectExtended = ( params : Connection ) => {
24
22
onConnectAction ( params ) ;
Original file line number Diff line number Diff line change @@ -45,11 +45,9 @@ const SelectionRect = () => {
45
45
} ;
46
46
47
47
export default memo ( ( { isInteractive } : UserSelectionProps ) => {
48
- const { setUserSelection, updateUserSelection, unsetUserSelection } = useStoreActions ( ( a ) => ( {
49
- setUserSelection : a . setUserSelection ,
50
- updateUserSelection : a . updateUserSelection ,
51
- unsetUserSelection : a . unsetUserSelection ,
52
- } ) ) ;
48
+ const setUserSelection = useStoreActions ( ( a ) => a . setUserSelection ) ;
49
+ const updateUserSelection = useStoreActions ( ( a ) => a . updateUserSelection ) ;
50
+ const unsetUserSelection = useStoreActions ( ( a ) => a . unsetUserSelection ) ;
53
51
54
52
if ( ! isInteractive ) {
55
53
return null ;
You can’t perform that action at this time.
0 commit comments