Skip to content

Template refs defined inside reactive object do not work #901

@danyadev

Description

@danyadev

Version

3.0.0-alpha.10

Reproduction link

https://jsfiddle.net/1oxdbr0u/1/

Steps to reproduce

  1. Create reactive object in setup like reactive({ foo: null })
  2. Create an element in the template with this ref (<div ref="foo"></div>)
  3. Try to get this element inside onMounted hook

What is expected?

HTML element

What is actually happening?

null


If you use ref or convert a reactive object using toRefs, then everything works fine

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