Questions tagged [svelte]
Svelte is a component framework — like React or Vue. On-topic questions include code using Svelte and how to configure it and use it in your javascript pipelines.
5 questions
1
vote
0
answers
29
views
SvelteKit authentication hook with token refresh and request deduplication
I've implemented a SvelteKit handleFetch hook that manages authentication for API requests with automatic token refresh. The API provides a 15-second grace period where a refresh token remains valid ...
2
votes
1
answer
77
views
Is there a way to refactor this code? Can I create an helper from it?
I need all the below code to be able to persist in the URL (query string) some variables I'm using in a Svelte 5 / Svelte Kit project page.
I also need to assign URL query params to variables on page ...
1
vote
1
answer
432
views
adding characters on mouseover using Svelte
This is my first time using svelte. I am also using tailwind and astro but that is irrelevant. The following component prepends >> to my text when it is ...
1
vote
1
answer
539
views
Awaited store for Svelte
In my Svelte app, I need to reactively fetch data from the server and then render the result. The ideal data struture for this is a store whose values are promises – eg. like this:
...
4
votes
0
answers
179
views
HSL Guessing Game in Svelte
The objective of the game is to guess the hue, saturation, and lightness values of a given color swatch across ten rounds.
https://github.com/shreyasminocha/guess-the-hsl
https://guess-the-hsl.now.sh
...