All Questions
Tagged with svelte-5 svelte-component
6 questions
0
votes
0
answers
33
views
Svelte Routing - Cannot read properties of undefined (reading 'before')
Not able to get routing to work without a bug. The route works if I click on the link twice, the second time, the correct page renders. The first a console output error is generated.
ERROR:
Uncaught ...
1
vote
2
answers
505
views
Other than children(), can I import and render multiple snippets in +layout.svelte that are defined in +page.svelte?
New to SvelteKit and trying to figure this part out...
Here's a couple of ways I was trying to achieve this, but the sidebar either doesn't load, or the navigation appears twice for some reason; with ...
0
votes
1
answer
80
views
How to disable svelte-check error in HTML part of Svelte component?
I have a component written in Svelte 5, using $props() rune.
LogActions.svelte
<script lang="ts">
//@ts-expect-error
let { onSave }: { (): void } = $props() ;
</script>
<...
0
votes
1
answer
201
views
How to Wrap Each Child with a Tag in Svelte 5?
In Svelte 5, how can I wrap each child with a tag like the example below?
{#if children}
{#each children as child}
<button
onclick={() => {
handleClick();
}}
>
...
2
votes
2
answers
3k
views
How to Replace Deprecated <slot /> with {@render} in Svelte 5 for Nested Components?
I'm currently upgrading from Svelte 4 to Svelte 5 (using SvelteKit), and I'm encountering an issue when trying to replace the deprecated <slot /> with {@render} in my components.
I'm looping ...
1
vote
1
answer
427
views
How can I pass components from server files to svelte pages with Svelte5?
I am writing a blog site using mdsvex and SvelteKit5. My current +page.server.ts file tried to pass the rendered component, but it is now a function and not an object (link to docs) and therefore I ...