Skip to content

Commit bad7e3c

Browse files
committed
docs: ssr notes
1 parent 08990ca commit bad7e3c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/guide/ssr.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
If you are using Nuxt.js, read the [Nuxt guide](/nuxt/getting-started.md) instead, most of the things are already configured for you.
66
::: -->
77

8+
::: warning
9+
SSR support is still experimental. Please report any issues you find.
10+
:::
11+
12+
## SSR with Vitesse
13+
814
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. VueFire already waits for the data for you if you use the composables within components:
915

1016
<FirebaseExample>
@@ -55,7 +61,12 @@ export const install: UserModule = ({ isClient, initialState, app }) => {
5561
useSSRInitialState(initialState.vuefire, firebaseApp)
5662
} else {
5763
// on the server we ensure all the data is retrieved in this object
58-
initialState.vuefire = useSSRInitialState()
64+
initialState.vuefire = useSSRInitialState(
65+
// let `useSSRInitialState` create the initial object for us
66+
undefined,
67+
// this is necessary to work with concurrent requests
68+
firebaseApp,
69+
)
5970
}
6071
}
6172
```

0 commit comments

Comments
 (0)