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
When doing SSR (Server Side Rendering) you want to wait for the data on the server to serialize it and retrieve it on the client side where it will displayed
4
+
5
+
## Vue 3 + Suspense
6
+
7
+
By serializing the data on the server (using a store like [Pinia](https://pinia.vuejs.org) for example) and `await`ing the returned `promise` of `useDocument()` you can ensure your data is loaded when rendering the page on the server and hydrating on the client.
Make sure your component is the descendant of [`<Suspense>`](https://vuejs.org/guide/built-ins/suspense.html) in order to use `await` within `<script setup>`.
0 commit comments