Skip to content

chore: update ref on functional component #2145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/v2/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,11 @@ type: api

An important note about the ref registration timing: because the refs themselves are created as a result of the render function, you cannot access them on the initial render - they don't exist yet! `$refs` is also non-reactive, therefore you should not attempt to use it in templates for data-binding.

- **See also:** [Child Component Refs](../guide/components.html#Child-Component-Refs)
> Note: The reference will be HTMLElement when used to functional components because they’re stateless and instanceless.

- **See also:**
- [Child Component Refs](../guide/components.html#Child-Component-Refs)
- [Functional Components](../guide/render-function.html#Functional-Components)

### is

Expand Down