Skip to content
Discussion options

You must be logged in to vote

@frederikhors, i was able to persist and load client with this when disabling ssr ( might also work with ssr). Let me know if this worked? BTW I'm not using the query-persist-core because it rewrites every time the query cache changes, and I think frequently JSON.stringify-ing and writing the local storage might slows down my app ( I maybe wrong here ), so what i did here was saved the query state on unload. This only works when the function is non asynchronous and writing to local storage is synchronous.

<script>
  import { setContext, onMount } from "svelte";
  import { hydrate, dehydrate } from "@tanstack/svelte-query";
  import { SvelteQueryDevtools } from "@tanstack/svelte-query-devt…

Replies: 3 comments 14 replies

Comment options

You must be logged in to vote
1 reply
@frederikhors
Comment options

Comment options

You must be logged in to vote
13 replies
@sharmapukar217
Comment options

@frederikhors
Comment options

@frederikhors
Comment options

@sharmapukar217
Comment options

@sharmapukar217
Comment options

Answer selected by frederikhors
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants