Skip to content

Commit 4096149

Browse files
Optimized callback creation a bit
1 parent 67f6ea5 commit 4096149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frameworks/keyed/voby/src/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ const App = (): JSX.Element => {
175175
<For values={$data}>
176176
{( $datum: IDatum ) => {
177177
const {id, label, className} = $datum ();
178-
const onSelect = () => select ( id );
179-
const onRemove = () => remove ( id );
178+
const onSelect = select.bind ( undefined, id );
179+
const onRemove = remove.bind ( undefined, id );
180180
const props = {id, label, className, onSelect, onRemove};
181181
return RowTemplate ( props );
182182
// return RowDynamic ( props );

0 commit comments

Comments
 (0)