Last active
June 3, 2019 17:53
-
-
Save MrMjauh/d1ac9a23c01364afa90c2407dbc70e48 to your computer and use it in GitHub Desktop.
Connected component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Explore extends React.Component<Props, State> { | |
public render() { | |
const req: PageableSearchResult<string> | undefined = this.getRequest(); | |
return ( | |
<Pagination<number> | |
ref={this.paginationRef} | |
lastSyncedPage={this.lastSyncedPage()} | |
requestPage={(page: number) => this.requestPage(page)} | |
nextPage={() => req != null && req.next != null ? req.next : undefined} | |
> | |
... some data | |
</Pagination> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment