Skip to content

Instantly share code, notes, and snippets.

@agoiabel
Created March 6, 2019 11:04
Show Gist options
  • Save agoiabel/3734367a6236baed50d432c62f6ee3bf to your computer and use it in GitHub Desktop.
Save agoiabel/3734367a6236baed50d432c62f6ee3bf to your computer and use it in GitHub Desktop.
renderPageNumbers = pageNumbers.map(number => {
let classes = this.state.current_page === number ? styles.active : '';
return (
<span key={number} className={classes} onClick={() => this.makeHttpRequestWithPage(number)}>{number}</span>
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment