Skip to content
Discussion options

You must be logged in to vote

SvelteKit will automatically await all top-level promises returned from a load function. This is why rendering is blocked until both promises resolve.

If you don't want that behavior, you can nest them in an object so they are no longer at the top level.

	return {
		nested: { // this key can be named anything
		    geoLookup: geo, // the promise is not at the top level, so it is not automatically awaited
		    ptrLookup: ptr
		}
	};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jloh
Comment options

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