Skip to content

Template Ref in Root definition is null #789

@kylerberry

Description

@kylerberry

Version:
Vue 3.1.4

Description:
My root component is attempting to retrieve a template reference in onMounted() but myRef.value is coming up null. However, using getCurrentInstance().refs.myRef does get the correct value.

Reproduce-able Link
https://codesandbox.io/s/flamboyant-bush-86hu9?file=/src/App.vue

Expectaction
myRef.value should not be null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions