Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data fetched in +layout.server.ts only loads after the initial render [SvelteKit/Svelte 5 (Runes)] #1753

Open
mitchuman opened this issue Aug 15, 2024 · 0 comments
Assignees

Comments

@mitchuman
Copy link

I've Converted the setup documented here to use Runes.

Screenshot 2024-08-14 at 10 25 29 PM

I've fetched data in a layout and a catch-all route server files, but only the catch-all route has the data pass to the .svelte file on the server.

Data fetched into the +layout.svelte only populates after first render.

Screen.Recording.2024-08-14.at.10.26.54.PM.mov

Notice the page loads with page data already rendered (the "Updated weekly..." copy), but the navigation content is initially empty.

My thought is, the useQuery function is not fully converted to Svelte 5 (Runes), but not sure if this is what's causing the layout data to load only after the initial render...

For reference, I have a repo/repro here

@mitchuman mitchuman changed the title svelte-loader to update for the upcoming Svelte 5 (Runes)? Data fetched in +layout.server.ts only loads after the initial render. [SvelteKit/Svelte 5 (Runes)] Aug 15, 2024
@mitchuman mitchuman changed the title Data fetched in +layout.server.ts only loads after the initial render. [SvelteKit/Svelte 5 (Runes)] Data fetched in +layout.server.ts only loads after the initial render [SvelteKit/Svelte 5 (Runes)] Aug 15, 2024
@rdunk rdunk self-assigned this Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants