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
If you are using `useBreakpoints` with SSR enabled, then you need to specify which screen size you would like to render on the server and before hydration to avoid an hydration mismatch
If you are using `useMediaQuery` with SSR enabled, then you need to specify which screen size you would like to render on the server and before hydration to avoid an hydration mismatch
Used to set a global viewport width which will be used when rendering SSR components that rely on the viewport width like [`useMediaQuery`](../useMediaQuery/index.md) or [`useBreakpoints`](../useBreakpoints/index.md)
8
+
9
+
## Usage
10
+
11
+
```js
12
+
import { provideSSRWidth } from'@vueuse/core'
13
+
14
+
constapp=createApp(App)
15
+
16
+
provideSSRWidth(500, app)
17
+
```
18
+
19
+
Or in the root component
20
+
21
+
```vue
22
+
<script setup>
23
+
import { provideSSRWidth } from '@vueuse/core'
24
+
25
+
provideSSRWidth(500)
26
+
</script>
27
+
```
28
+
29
+
To retrieve the provided value if you need it in a subcomponent
0 commit comments