FrontendArk

Master Frontend Interviews

  • Practice
  • Playground
  • Resource
Medium

Users Data Table with Sorting

40 mins

Build a data table in React that displays a list of users and allows sorting by columns.

Requirements:

  1. Display user data in a table with columns: Name, Age, and Email.
  2. Add sorting functionality:
    • Clicking on a column header sorts the table by that column.
    • Clicking again toggles ascending/descending order.
  3. Indicate which column is currently sorted.
  4. Sorting should work for both text and numbers.
  5. Focus on functionality over styling.

Code Editor

React Component

00:00
Loading...

Live Preview

See your React component