mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Convert components concept docs from SC to FC - moved struct components to advanced topics - added docs about HOC for Suspense and Context - added a ease-in topic before components that introduces HTML/CSS/JS in yew - edit components concept to use function components * translations * fix todo links * fix tests * spelling bee
15 lines
434 B
Plaintext
15 lines
434 B
Plaintext
---
|
|
title: "Node Refs"
|
|
description: "Out-of-band DOM access"
|
|
---
|
|
|
|
The `ref` keyword can be used inside of any HTML element or component to get the DOM `Element` that
|
|
the item is attached to. This can be used to make changes to the DOM outside of the `view` lifecycle
|
|
method.
|
|
|
|
This is useful for getting ahold of canvas elements, or scrolling to different sections of a page.
|
|
|
|
## Example
|
|
|
|
See [use_node_ref hook](./hooks/use-node-ref)
|