Skip to content

Commit 0526d5b

Browse files
committed
add comment
1 parent 3c50ffc commit 0526d5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/DraggableFlatList.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ function DraggableFlatList<T>(
443443
);
444444
}
445445

446+
// Generic forwarded ref type assertion taken from:
447+
// https://fettblog.eu/typescript-react-generic-forward-refs/#option-1%3A-type-assertion
446448
export default React.forwardRef(DraggableFlatList) as <T>(
447449
props: DraggableFlatListProps<T> & { ref?: React.ForwardedRef<FlatList<T>> }
448450
) => ReturnType<typeof DraggableFlatList>;

0 commit comments

Comments
 (0)