Sorting With useMemo

ReactJS Medium 6 views
Back to Questions

Problem Description

Sort a list only when sort options change, not on every render.

Input Format

No input.

Output Format

Render a React component.

Constraints

Use useMemo for sorting and avoid mutating the original array.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev