I would like to write those two lines as one:
const { page, totalPages, changePage } = this.props;
const pagination = { page, totalPages, changePage };
I could not find anywhere how to do it, it only makes sense that I would be able to do it in one line.
I was hoping for something like
const pagination = { page, totalPages, changePage } = this.props;