You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all! Just wanted to create this issue to address and document some potential breaking changes to this library in upcoming versions. Basically, with latest version of @tanstack/svelte-query, the way to do reactivity shifted from using reactive statements ($ labels) to stores. Since I found a bit of time to work on this library, I thought that I would update it to be compatible with that standard. After some experimentation, I feel that the following changes need to be made:
This option would disable the query by default and return a function to resolve/enable them. This resolve function will also optionally take in Promise<TData> which will populate the query cache before enabling, effectively simplifying the process of streaming the query data from the server(#22). Basically, this would look something like this:
I plan on implementing these incrementally over the course of the next few weeks. One thing to address here would be the release of Svelte 5 and reactivity using runes, which is likely be adopted by Tanstack Query sooner or later. However, as of today, discussion of this is mainly just one issue and one draft PR which isn't likely to be merged in the near future. Once this gets merged into a stable version, I will implement those changes here accordingly.
The text was updated successfully, but these errors were encountered:
Just an update but the draft svelte 5 PR was merged into the svelte-5-adapter branch and can be tested by installing pnpm add https://pkg.pr.new/@tanstack/svelte-query@4e3325e.
Hey @raymonddaikon, thanks for letting me know! I'll keep an eye on it and maybe maintain support for that on a separate branch when I am done with this issue. I'll make sure to update the README when that happens.
Hey all! Just wanted to create this issue to address and document some potential breaking changes to this library in upcoming versions. Basically, with latest version of
@tanstack/svelte-query
, the way to do reactivity shifted from using reactive statements ($
labels) to stores. Since I found a bit of time to work on this library, I thought that I would update it to be compatible with that standard. After some experimentation, I feel that the following changes need to be made:lazy
option to makecreateQuery
,createInfiniteQuery
andcreateQueries
. #49This option would disable the query by default and return a function to resolve/enable them. This resolve function will also optionally take in
Promise<TData>
which will populate the query cache before enabling, effectively simplifying the process of streaming the query data from the server(#22). Basically, this would look something like this:I plan on implementing these incrementally over the course of the next few weeks. One thing to address here would be the release of Svelte 5 and reactivity using runes, which is likely be adopted by Tanstack Query sooner or later. However, as of today, discussion of this is mainly just one issue and one draft PR which isn't likely to be merged in the near future. Once this gets merged into a stable version, I will implement those changes here accordingly.
The text was updated successfully, but these errors were encountered: