You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to fetch my db before any single bit of my SvelteKit SPA can load, I currently use init() insidie hooks.client.ts but errors invoked using kit's error() aren't presented in either +error.svelte or error.html
Describe the proposed solution
I would like an optional fallback (while init() is awaited) and error page (when init() throws), ideally with our css files loaded (for styling). Currently, if there is an error a white screen is presented with no indication of what went wrong which is confusing to users.
Alternatives considered
Use root layouts for initial stuff but in my experience this has been clunky for init() stuff that needs to load once and requires extra conditional logic and I need separation of concerns. If there are other ways that I can handle this that I haven't considered or am not aware of do share!
Importance
would make my life easier
Additional Information
Router Mode: #hash Adapter adapter-static
The text was updated successfully, but these errors were encountered:
Describe the problem
I need to fetch my db before any single bit of my SvelteKit SPA can load, I currently use
init()
insidiehooks.client.ts
but errors invoked using kit'serror()
aren't presented in either+error.svelte
orerror.html
Describe the proposed solution
I would like an optional fallback (while init() is awaited) and error page (when init() throws), ideally with our css files loaded (for styling). Currently, if there is an error a white screen is presented with no indication of what went wrong which is confusing to users.
Alternatives considered
Use root layouts for initial stuff but in my experience this has been clunky for
init()
stuff that needs to load once and requires extra conditional logic and I need separation of concerns. If there are other ways that I can handle this that I haven't considered or am not aware of do share!Importance
would make my life easier
Additional Information
Router Mode: #hash
Adapter adapter-static
The text was updated successfully, but these errors were encountered: