Skip to content

Instantly share code, notes, and snippets.

@jittuu
Last active March 16, 2023 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jittuu/bbcc5021d5ad9b01921c3c6f7c4cb1b7 to your computer and use it in GitHub Desktop.
Save jittuu/bbcc5021d5ad9b01921c3c6f7c4cb1b7 to your computer and use it in GitHub Desktop.
BottomSheetFlashList
import React from 'react';
import {BottomSheetScrollView} from '@gorhom/bottom-sheet';
import {FlashList, FlashListProps} from '@shopify/flash-list';
type Props<T> = Omit<FlashListProps<T>, 'renderScrollComponent'>;
const BottomSheetFlashList = <T,>(props: Props<T>) => {
return (
<FlashList<T>
{...props}
renderScrollComponent={BottomSheetScrollView as any}
/>
);
};
export default BottomSheetFlashList;
@jittuu
Copy link
Author

jittuu commented Mar 16, 2023

Usage

import BottomSheet from "@gorhom/bottom-sheet";
...
...
...
<BottomSheet>
    ....
    <BottomSheetFlashList
        ...
    />
    ...
</BottomSheet>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment