From 28ebf38b5ee431d5191a38cc29852e4cdef399fa Mon Sep 17 00:00:00 2001 From: Nicolas Merget <104347736+nmerget@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:13:47 +0200 Subject: [PATCH] docs: note for useRef hook to avoid naming it "ref" -> conflict with vue (#1557) --- packages/docs/src/routes/docs/hooks/index.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/docs/src/routes/docs/hooks/index.mdx b/packages/docs/src/routes/docs/hooks/index.mdx index 501d76655f..489212dbed 100644 --- a/packages/docs/src/routes/docs/hooks/index.mdx +++ b/packages/docs/src/routes/docs/hooks/index.mdx @@ -46,6 +46,9 @@ export default function MyComponent() { } ``` +> **Note:** Don't name your `useRef` hook "ref" like `const ref = useRef(null);`. +> This would be a conflict with the `ref` from [Vue](https://vuejs.org/api/reactivity-core.html#ref). + ### forwardRef for React