Skip to content

Commit 64f0215

Browse files
committed
chore(client): add comments for data-allow-mismatch usage
1 parent bb265c0 commit 64f0215

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/client/src/components/ClientOnly.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { defineComponent, onMounted, ref } from 'vue'
22

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

0 commit comments

Comments
 (0)