Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.
This repository was archived by the owner on May 20, 2024. It is now read-only.

Hydration error while using v-if #45

Description

@eljass

We got a hydration error when showing other variants than the first one on the first visit on site. This is due to that the server-side code that contains active variation to be the first index and then immediately after the variant changes.

I used v-if to conditionally render the visible component. Using v-show fixes this error but then the first variant will flash at the first load. Is it possible to trigger variant selection before Nuxt creates HTML code in the server? Right now we have fixed this by wrapping these components inside <client-only> tags, but this shows a blank area (or placeholder) for the area where the component should appear.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions