T
TanStack13mo ago
correct-apricot

Suggestions on Using TanStack Query with SvelteKit

i am building an web app with svelteKit, and currently doing the fetching, pagination, filtering and mutation stuff with build-in load functions and from-actions of sveltekit. the typical url looks like this: https://www.example.com?page=1&scope=enabled&platform=something so everytime page or scope or platform states change, i modify the url params and like goto('{modified-url}') that will trigger the load function again and i get the filtered result. so every state changes, i ned to hit the server. if i use tanstack query, i need to give-up on sveltekit features like form-actions and roll-back to api routes, right? so i am here for listening suggestions from you guys. is it worth it or any suggestions...
1 Reply
extended-salmon
extended-salmon13mo ago
if you are just concerned about fetching data, it's pretty good. you can still use form-actons when you want to and mutations in other places. oh, there is also a #svelte-query-questions channel

Did you find this page helpful?