Skip to content

How should I display contents while load is processing with client-side rendering? #7119

Answered by theetrain
theetrain asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you @s3812497 and @danawoodman for your suggestions. I've concluded that different situations may call for different solutions when it comes to presenting placeholder data while critical data is taking longer than usual to load; and it isn't necessarily the responsibility of SvelteKit's load method to provide intermediate states.

Custom intermediate state while a page loads

For my needs, displaying a 'loading' message of some kind while transitioning to a new page can be achieved with a custom loading flag, beforeNavigate, and afterNavigate in a wrapping layout. Here is a rough demonstration of that effect: https://stackblitz.com/edit/sveltejs-kit-ssr-states?file=src%2Froutes%2Fmerg…

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
5 replies
@sdekna
Comment options

@theetrain
Comment options

@fabiot21
Comment options

@theetrain
Comment options

@fabiot21
Comment options

Comment options

You must be logged in to vote
5 replies
@theetrain
Comment options

@danawoodman
Comment options

@theetrain
Comment options

@danawoodman
Comment options

@theetrain
Comment options

Comment options

You must be logged in to vote
2 replies
@austins
Comment options

@theetrain
Comment options

Answer selected by theetrain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants