Skip to content

Commit

Permalink
feat: use spread operator for native props
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Aug 24, 2023
1 parent df90465 commit 79d651f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/MyDraggableList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@ import React from 'react';
import DraggableFlatList from 'react-native-draggable-flatlist';
import type { Props } from './types';

export const MyDraggableList = ({
items,
renderItem,
onDragEnd,
onDragBegin,
}: Props) => {
export const MyDraggableList = ({ items, ...props }: Props) => {
return (
<DraggableFlatList
data={items}
onDragEnd={onDragEnd}
onDragBegin={onDragBegin}
keyExtractor={(item) => item.id}
renderItem={renderItem}
{...props}
/>
);
};

0 comments on commit 79d651f

Please sign in to comment.