PaginationContainer
PaginationContainer
PaginationContainer
is designed to simplify the workflow of loading more items in a list -- in many cases, we don't want to fetch all the data at once but lazily load more data. It relies on a GraphQL server exposing connections in a standardized way. For a detailed spec, please check out this page.
this.props.relay
exposes the following APIs:
type Variables = {[name: string]: any}; type RefetchOptions = { force?: boolean, // Refetch from the server ignoring anything in the cache. }; type Disposable = { dispose(): void, }; /** * Check if there is at least one more page. */ hasMore: () => boolean, /** * Check if there are pending requests. */ isLoading: () => boolean, /** * Execute the pagination query. Relay w