Why for the first page only the queryKey
's pagination
is a Proxy object and for the following pages not?
#7602
Unanswered
frederikhors
asked this question in
Q&A
Replies: 2 comments
-
This has nothing to do with svelte-query |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh, hey! Thanks for your answer. Do you think it's a Svelte 5 problem? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I opened sveltejs/svelte#11854 thinking this is a Svelte 5 issue, but maybe is a tanstack one.
Steps to reproduce:
Open the reproduction
Open the browser console
When the project starts it will errors with:
This is happening because IndexedDB cannot serialize and persist a Proxy object which is
pagination
in this case.But...
If you click on "Next" button the pagination changes from
{"page":1,"size":5}
to{"page":2,"size":5}
and IndexedDB persists the object with no issues!Even stranger: if you click on the "Previous" button it changes from
page:2
topage:1
and the error is here again!Why for the first page only the
queryKey
'spagination
is a Proxy object and for the following pages not?How often does this bug happen?
Every time
Tanstack Query adapter
svelte-query
TanStack Query version
5
TypeScript version
5
Beta Was this translation helpful? Give feedback.
All reactions