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
Is your feature request related to a problem? Please describe.
I am currently using the @sanity/svelte-loader package for my application and below is a very contrived version of the problem I'm facing:
This page works fine if it's being navigated to from other pages, but if I navigate to the same page type via a.relevant-link, the URL would be updated but my content would remain the same because of the $q store not being updated, ie data now receives the correct new slug from event.params, but the item destructured from $q is still of the first page.
Describe the solution you'd like
It would be good if the useQuery function or store returns a setter function that I can use to update the query params
Describe alternatives you've considered
I considered writing my own Svelte store to handle these queries so that I can do a .set() myself but after looking into the source code, it looks like there are a lot of other features in useQuery() that I might miss out on, so I stopped the idea.
Is your feature request related to a problem? Please describe.
I am currently using the @sanity/svelte-loader package for my application and below is a very contrived version of the problem I'm facing:
This page works fine if it's being navigated to from other pages, but if I navigate to the same page type via
a.relevant-link
, the URL would be updated but my content would remain the same because of the$q
store not being updated, iedata
now receives the correct new slug fromevent.params
, but theitem
destructured from$q
is still of the first page.Describe the solution you'd like
It would be good if the
useQuery
function or store returns a setter function that I can use to update the query paramsDescribe alternatives you've considered
I considered writing my own Svelte store to handle these queries so that I can do a
.set()
myself but after looking into the source code, it looks like there are a lot of other features inuseQuery()
that I might miss out on, so I stopped the idea.Additional context
The text was updated successfully, but these errors were encountered: