The React hook that returns the RefreshControl component to performs refetch in Relay.
Install the package using the following command:
yarn add @os-design-mobile/use-refresh-control
const { data, refetch } = usePaginationFragment(
collectionsFragment,
userCollectionsKey
);
const refreshControl = useRefreshControl(refetch, collectionListScreenQuery, {
know,
});
return <FlatList refreshControl={refreshControl} />;