Remember `setPage` on `useInfiniteOffsetPaginationQuery`
Myzel394 opened this issue · comments
Describe the bug
As you can see on https://github.com/psteinroe/supabase-cache-helpers/blob/main/packages/postgrest-swr/src/query/use-infinite-offset-pagination-query.ts#L105, the value is rerendered every time. Remember that function please (+ you may wanna do that for each function)
To Reproduce
- Use
useInfiniteOffsetPaginationQuery
- Use
setPage
in an effect - Cry because you just lost so much time dealing on why there are unnecessary rerenders ;c;
Expected behavior
No rerender
Additional context
I can not create a PR for you ❤️