#Pagination and searching together
5 messages · Page 1 of 1 (latest)
- current page goes into the queryKey
- filters go into the queryKey
there is nothing special about that combination
so this is actually possible with single useQuery right? I think I understood, my endpoint looks like /api/v1/customers?page=1&name=customerName, so I believe queryKey should take both page and name states
as far as I understood, useQuery acts like useEffect and reruns the query when queryKeys are updated
yep