I am using svelte/sapper with polka. I have some initial values to be fetched and stored in session from a web service before any page is loaded. What is the best recommended way to do this.
I tried doing this in _layout in the root. But as the fetch is asynchronous, values are not available in the first page load.
Your layout components can use preload
: https://sapper.svelte.dev/docs#Preloading
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With