Subscribe on changes!

Imported `ref` variables in `<script setup>` are not properly handled for template refs

avatar
Sep 15th 2021

Version

3.2.11

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Open the reproduction link above. Open the console and check the result.

There is an imported ref variable named compRef, which is later used in the template pointing to a component.

What is expected?

compRef.value should be the component instance.

What is actually happening?

compRef.value is null.


See this also for comparison, in which ref variables (created in-place, not imported) are properly handled.

avatar
Sep 15th 2021

duplicate of #4546