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
Copy file name to clipboardExpand all lines: apps/docs/src/pages/composables/plugins/use-storage.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,9 @@ The `get()` method returns reactive refs that sync with storage automatically.
137
137
> [!TIP] Auto-persistence
138
138
> Refs returned by `get()` are watched with `{ deep: true }`. Any changes to the ref value automatically persist to storage.
139
139
140
+
> [!TIP] Empty strings are preserved
141
+
> `get()` uses nullish coalescing (`??`) internally, so an empty string `''` is a valid stored value — it is never treated as absent or replaced by the default. Only `null` and `undefined` trigger the default.
0 commit comments