Is there a more efficient way to implement conditional formatting for this scenario?
const PaginationStorePageLink = ({ store, pageNum }) => (observer(({ PaginationStore }) => {
const className = this.props.store.currentPage === this.props.pageNum ? styles.bold : styles.primary;
return (
<PaginationLink className={className} onClick={this.props.store.goToPage(this.props.pageNum)} />
);
}));
I am wondering if it is possible to concatenate classes together. For example, applying the ".primary" class always, but adding ".bold" only when certain conditions are met.