We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unstate
1 parent 2a0097e commit 877ff1eCopy full SHA for 877ff1e
.changeset/old-houses-drum.md
@@ -0,0 +1,5 @@
1
+---
2
+'svelte': patch
3
4
+
5
+fix: provide `unstate` in server environment
packages/svelte/src/main/main-server.js
@@ -20,3 +20,13 @@ export function beforeUpdate() {}
20
21
/** @returns {void} */
22
export function afterUpdate() {}
23
24
+/**
25
+ * @template T
26
+ * @param {T} value
27
+ * @returns {T}
28
+ */
29
+export function unstate(value) {
30
+ // There's no signals/proxies on the server, so just return the value
31
+ return value;
32
+}
0 commit comments