reactuse icon indicating copy to clipboard operation
reactuse copied to clipboard

[HOOK] useSorting

Open virus231 opened this issue 4 months ago • 1 comments

useSorting hook provides a simple way of sorting big chunks of data by key and direction. Example: https://www.prismane.io/docs/hooks/state-management/use-sorting#overview

virus231 avatar Sep 19 '25 21:09 virus231

@virus231 Hi, thanks for your interest in our library.

I looked at implementations elsewhere and found very little on this topic.

It seems the hook you posted is too specific, and doing something similar in https://v9-8-1.vueuse.org/core/usesorted/ in React doesn't make sense. I'd like to have a hook that allows sorting of any nested elements, which is literally Array.sort, which users can then wrap in useMemo if needed.

What do you think ?

debabin avatar Sep 22 '25 15:09 debabin