Skip to content

Commit

Permalink
chore(client): add comments for data-allow-mismatch usage
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Sep 3, 2024
1 parent bb265c0 commit 64f0215
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/client/src/components/ClientOnly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import { defineComponent, onMounted, ref } from 'vue'

/**
* Wrapper component that only renders its content on the client side and skips server side rendering
*
* Since vue 3.5, you can try the new `data-allow-mismatch` attribute instead of `<ClientOnly>` component in some cases to avoid hydration mismatch.
*
* @see https://blog.vuejs.org/posts/vue-3-5#data-allow-mismatch
*/
export const ClientOnly = defineComponent({
name: 'ClientOnly',
Expand Down

0 comments on commit 64f0215

Please sign in to comment.