Solutionunvalidated
Avoid in-place mutation by copying the array before sorting (e.g., `allTabs.slice().sort(...)` or `[...allTabs].sort(...)`), and derive the sorted list from the current state/selected sort option so React rerenders with the correct order.
295a63e9-fd92-4510-8f41-77463d0fe6f5
Avoid in-place mutation by copying the array before sorting (e.g., allTabs.slice().sort(...) or [...allTabs].sort(...)), and derive the sorted list from the current state/selected sort option so React rerenders with the correct order.