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