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
Hi everyone,
I tried to find this topic in the discussion, but I couldn't find what I wanted.
Now, I know +layout.svelte is a central file that receives the response from the server's load functions, so it passes it to the pages, or it can communicate it to the store writables. Yet, responses coming from actions (of enhanced forms) are not captured by this file.
All of the server responses are going through the server hook file, but it is a server file that cannot communicate with the store (therefore, client-side components don't have global access to the info.). Isn't there any node within the sveltekit eco-system that handle such responses in a collective way.
The example here is for a message object that any server request would like to have access to, but then, where in the client-side we can centrally handle this message object, so it appears as a toast UI for example.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I tried to find this topic in the discussion, but I couldn't find what I wanted.
Now, I know +layout.svelte is a central file that receives the response from the server's load functions, so it passes it to the pages, or it can communicate it to the store writables. Yet, responses coming from actions (of enhanced forms) are not captured by this file.
All of the server responses are going through the server hook file, but it is a server file that cannot communicate with the store (therefore, client-side components don't have global access to the info.). Isn't there any node within the sveltekit eco-system that handle such responses in a collective way.
The example here is for a message object that any server request would like to have access to, but then, where in the client-side we can centrally handle this message object, so it appears as a toast UI for example.
Cheers,
Beta Was this translation helpful? Give feedback.
All reactions