Improving Svelte 5 URL State Persistence with useQueryPersistence
#13855
Unanswered
frederikhors
asked this question in
Q&A
Replies: 0 comments
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.
-
I've tried many ideas in the past to achieve similar ease of use in Svelte 5 components:
What I wanted is to be able to read and write to the URL (as also suggested by Svelte Kit here).
I wrote this code but I think it is far from the perfection that both Svelte and SvelteKit deserve.
Can you help me improve it?
I can then create a PR to suggest this code as an example for the benefit of all, maybe even on sveltesociety.dev.
I tried sveltekit-search-params but it doesn't work as I would like and it's not written in Svelte 5.
The code:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions