psteinroe / supabase-cache-helpers

A collection of framework specific Cache utilities for working with Supabase.

Home Page:https://supabase-cache-helpers.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Use useInfiniteOffsetPaginationQuery
  2. Use setPage in an effect
  3. 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 ❤️