What is shared state
?
#4343
-
Source: Loading, SvelteKit Documentation This discussion will answer #2213 (comment). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
state: the particular condition something is in at a specific time "shared state" in this context essentially means a variable shared by two different requests. Using |
Beta Was this translation helpful? Give feedback.
-
See also #4339 |
Beta Was this translation helpful? Give feedback.
-
See also: What is Singleton? by Tan Li Hau |
Beta Was this translation helpful? Give feedback.
state: the particular condition something is in at a specific time
shared: possessed in common with another or others
"shared state" in this context essentially means a variable shared by two different requests. Using
svelte/store
wouldn't be an example of shared state if you created a new instance of a store for each request, but often people will create a store as a global variable which causes it to be shared across requests