Sveltekit store that makes fetch call #8622
Answered
by
eltigerchino
JonathonRP
asked this question in
Q&A
-
Where is the fetch call made from, client or server? |
Beta Was this translation helpful? Give feedback.
Answered by
eltigerchino
Jan 22, 2023
Replies: 1 comment 6 replies
-
Depends where the store's function is called. Inside a When inside a server load function, it runs on the server. Otherwise, it would run on the client. |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
JonathonRP
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends where the store's function is called.
Inside a
.svelte
file and during SSR, it would run on the server.When inside a server load function, it runs on the server.
Otherwise, it would run on the client.