Replies: 1 comment 4 replies
-
What version of SvelteKit are you using?
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to show a skeleton or a loading message whenever a user navigates to a next page in a paginated list.
The
+page.server.ts
load
function takes less than 100ms to run but the data transfer can be long, and in these situations, I would like to show a skeleton.I already have this in
+page.server.ts
:And in
+page.svelte
:Using Dev Tools, I throttle my connection but I never see the skeleton, only the contents from the previous page.
Then, when the
__data.json
load finishes, the skeleton flashes for a moment and finally the new content is displayed.Using Bun, this happens in dev and production modes.
If I use
Bun.sleep(1000).then(\*data*\)
the skeleton appears for a second but only in production mode using either Bun or NodeJS adapters on a new project.In dev mode, the same behavior as before will play out.
Beta Was this translation helpful? Give feedback.
All reactions