Subscribe on changes!

The function was called unexpectedly when its name is the same as the component name

avatar
Jan 19th 2022

Version

3.2.27

Reproduction link

sfc.vuejs.org/

Steps to reproduce

open the reproduction link and see devtools console

What is expected?

hello wont be called

What is actually happening?

hello has be called


And the template ref's value is wrong too

avatar
Jan 19th 2022

This is expected You can resolve this by not using conflicting names for an imported component and local function .

<hello ref="helloRef" />

to

<Hello ref="helloRef" />

is a possible fix for your use case.

avatar
Jan 19th 2022

This is expected You can resolve this by not using conflicting names for an imported component and local function .

<hello ref="helloRef" />

to

<Hello ref="helloRef" />

is a possible fix for your use case.

It's works, thanks.