o
onecheck
20 Joined about 2 months ago
let or const for $derived runes in Svelte?

Variables in JavaScript can be defined using either let or const (ignoring the antiquated [var](...

0 votes 7 views 1 Answer Asked 28 days ago
How can I deal with localStorage in SvelteKit SSR?

I'm building a Notice component that users can dismiss, and I'm storing the displayed state of the notice, however, I would like to preserve it across sessions. localStorage seems like a good way to accomplish this, however, when trying to use localStorage I get s...

0 votes 11 views 1 Answer Asked about 2 months ago
How to loop an each block a specific x number of times in Svelte?

I know of Svelte's {#each} block which allows you to iterate over arrays or array-likes. However, there are some cases where I'm not interested in the data of an array, but rather in repeating a block a specific x number of time...

0 votes 22 views 1 Answer Asked about 2 months ago