vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.82k stars 8.35k forks source link

'BaseTransition' as name is occupied by Vue Core Components #8706

Open Laslo89 opened 1 year ago

Laslo89 commented 1 year ago

Vue version

3.3.4

Link to minimal reproduction

Broken Transition

Steps to reproduce

What is expected?

BaseTransition should be an allowed name for a custom component.

<BaseTransition>
 <p v-if="show"> should fade in / fade out</p>
</BaseTransition>

What is actually happening?

The transition effect never starts. Instead the wrapped element is rendered instantly

System Info

No response

Any additional comments?

If my reusable Transtition is imported under another name it works just fine. But according to official Docs / Conventions vue recommends using Base prefix or at least using it as an example / possible prefix.

conventions

pandavips commented 1 year ago

So, why not change the name?

Shyam-Chen commented 1 year ago

Use FadeTransition instead.

Laslo89 commented 1 year ago

To make my problem a bit clearer I have kept the example of the transition component simple. In fact, I use it in such a way that a transition name is passed as prop, which then dynamically decides which transition is executed. I think the name BaseTransition is appropriate and I don't plan to change it. Especially since I have more than one component prefixed with Base.