Topic:
- ReactJS
Task at hand:
- Changing the background style when a user selects a number.
- The background style is only visible if this.state.currentPage === number. Otherwise, no style is applied even though changing the background is desired.
Attempted Solution:
onClick={this.handleClick} style={this.state.currentPage === number ?
styles.paginationButtons : [styles.paginationButtons,
{backgroundColor:'blue'}]}>