Skip to content

Commit b138d62

Browse files
committed
docs: add tip for data-allow-mismatch attribute
1 parent 5556d9a commit b138d62

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: docs/reference/components.md

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ interface AutoLinkConfig {
9797
- Modify the component to only access Browser / DOM APIs in `onBeforeMount()` or `onMounted()` hook.
9898
- Wrap the component with `<ClientOnly>`.
9999

100+
:::tip
101+
Since Vue 3.5, if you only want to avoid hydration mismatch, you can try the new [data-allow-mismatch](https://blog.vuejs.org/posts/vue-3-5#data-allow-mismatch) attribute instead of `<ClientOnly>` component.
102+
:::
103+
100104
## Content
101105

102106
- Props:

Diff for: docs/zh/reference/components.md

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ interface AutoLinkConfig {
9797
- 修改这个组件,只在 `onBeforeMount()``onMounted()` Hook 中使用 浏览器 / DOM API 。
9898
- 使用 `<ClientOnly>` 包裹这个组件。
9999

100+
:::tip
101+
从 Vue 3.5 开始,如果你只是想避免 Hydration Mismatch ,可以尝试使用新的 [data-allow-mismatch](https://blog.vuejs.org/posts/vue-3-5#data-allow-mismatch) 属性来代替 `<ClientOnly>` 组件。
102+
:::
103+
100104
## Content
101105

102106
- Props:

0 commit comments

Comments
 (0)