Add argument to useQuery
to allow result to be filtered and sorted
#5471
Labels
useQuery
to allow result to be filtered and sorted
#5471
Problem
Currently when using
useQuery
, the result must be passed into auseMemo
in order to get a memoized filtered or sorted result. This is also not particularly useful, as when the result ofuseQuery
is re-rendered, the memo is called again as well as any filtered or sorted method calls.For example
Solution
A more elegant solution would be to have a callback within
useQuery
which would allow the filtered and sorted functions to be applied withinuseQuery
itself. It could also take a dependency array to determine when to reset the filtered or sorted method calls.Alternatives
No response
How important is this improvement for you?
Would be a major improvement
Feature would mainly be used with
Local Database only
The text was updated successfully, but these errors were encountered: