Adding Descending Functionality to Sort

Add the ability to sort in ascending or descending order with the generic sort function and a React component.

Although we have built out our full UI for searching and sorting, there’s no way to specify if we want our sorters to show data in ascending or descending order.

To fix this, let’s return to our genericSort() function. We can add an additional parameter to this function, called isDescending.

Get hands-on with 1400+ tech skills courses.