Skip to content
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

docs: update template refs render function * docs: update template refs render function * chore: remove sample * Update src/guide/extras/render-function.md resolved conversation Co-authored-by: Natalia Tepluhina <[email protected]> --------- Co-authored-by: Natalia Tepluhina <[email protected]> (#117) #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/api/component-instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The root DOM node that the component instance is managing.

```ts
interface ComponentPublicInstance {
$el: Node | undefined
$el: any
}
```

Expand Down
15 changes: 15 additions & 0 deletions src/guide/extras/render-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,21 @@ export default {
}
```

or (with version >= 3.5)

```js
import { h, useTemplateRef } from 'vue'

export default {
setup() {
const divEl = useTemplateRef('my-div')

// <div ref="divEl">
return () => h('div', { ref: 'my-div' })
}
}
```

</div>
<div class="options-api">

Expand Down