Skip to content

Hydration mismatch between server and client #1326

Closed Answered by mitjans
mitjans asked this question in Questions and Help
Discussion options

You must be logged in to vote

The problem was that I had document data shown in the same html tag (which I think it's weird).

<button
  v-for="document of documents"
  :key="document.id"
  @click="selected = document"
>
  {{ document.id }}: {{ document.content }}
</button>

I solved it by showing each document data in its separate html tag:

<button
  v-for="document of documents"
  :key="document.id"
  @click="selected = document"
>
  <span>{{ document.id }}<span>
  <span>{{ document.content }}</span>
</button>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mitjans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant