f
fern3
41 Joined about 1 month ago
How to split a string into chunks in Rust and insert spaces (or another character)?

Chars implements Iterator, meaning it does not provide a chunks method. While you can coerce Chars into a vector of chars, chunk it, collect, and so on... This is very inefficient as it involves allocatin...

0 votes Posted 1 day ago
`let` or `const` for `$derived` runes in Svelte?

You can manually override the value of a $derived variable. If you plan on taking advantage of this, you must use let. Otherwise, use const.

In the example you posted in your question, `cons...

1 vote Posted 25 days ago
How to type props in Svelte 5?

In Svelte 5, the $props rune returns component props as properties of an object. As such, to define the types of individual properties you have to create an object type and type its properties in accordance with your component pr...

0 votes Posted about 1 month ago