Skip to content

How to conditionally render a component with useDisplay composable (SSR)? #197

Description

@igorexa34314

I'm trying to conditionally render the navigation menu in the 'v-app-bar' based on the viewport size. I am using the mobile property from useDisplay() composable. If it's false, I render the list of links, otherwise the burger icon is rendered. On the local development server everything works fine. But when deploying on netlify, on initial loading, the list of links appears for a moment and then changes to burger button. This behavior is only seen on mobile devices. I have ssrClientHints.viewportSize enabled.

What could this be related to? Maybe I don't quite understand how ClientHints work.

Metadata

Metadata

Assignees

Labels

area: ssrSSR, hydration, SSGbugSomething isn't workingpriority: p3: mediumMedium: workaround exists or narrow case

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions