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: examples/vue-pinia/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,10 @@ This example demonstrates:
5
5
- Client-side state persistence using `pinia-plugin-persistedstate` (About page: counter persists across page reloads)
6
6
- Using `onCreatePinia` hook to register Pinia plugins
7
7
- Todo list with SSR data fetching and store population
8
+
- Client-only rendering for persisted stores to avoid hydration mismatches
8
9
9
10
> [!NOTE]
10
-
> The home page uses a **non-persisted** store to demonstrate SSR without hydration issues. The about page uses a **persisted** store to demonstrate localStorage persistence.
11
+
> The home page uses a **non-persisted** store to demonstrate SSR without hydration issues. The about page uses a **persisted** store with **client-only rendering** (`v-if="mounted"`) to avoid hydration mismatches between server (no localStorage) and client (has localStorage).
11
12
12
13
> [!NOTE]
13
14
> For more examples, see [Bati](https://batijs.dev) which generates `vike-vue` apps.
0 commit comments