Skip to content

Commit

Permalink
docs: note for useRef hook to avoid naming it "ref" -> conflict with …
Browse files Browse the repository at this point in the history
…vue (#1557)
  • Loading branch information
nmerget authored Sep 25, 2024
1 parent 627e320 commit 28ebf38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/docs/src/routes/docs/hooks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export default function MyComponent() {
}
```

> **Note:** Don't name your `useRef` hook "ref" like `const ref = useRef<HTMLInputElement>(null);`.
> This would be a conflict with the `ref` from [Vue](https://vuejs.org/api/reactivity-core.html#ref).
### forwardRef for React

<details>
Expand Down

0 comments on commit 28ebf38

Please sign in to comment.