Creating a Generic Sort React Component

Build a React component to use with your generic sort function.

Let’s write a generic component that we can use alongside our genericSort function to sort the application’s UI. To do this, we’ll create a new React component called Sorters. We’ll start off by writing some standard HTML5 dropdown markup, using a <select> element.

Get hands-on with 1200+ tech skills courses.