Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic component with pascalcase not working correctly #3507

Closed
donald-lendit opened this issue Mar 29, 2021 · 7 comments · Fixed by #3508
Closed

Dynamic component with pascalcase not working correctly #3507

donald-lendit opened this issue Mar 29, 2021 · 7 comments · Fixed by #3508
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working

Comments

@donald-lendit
Copy link

Version

3.0.9

Reproduction link

https://codesandbox.io/s/summer-sun-dymh9?file=/src/App.vue

Steps to reproduce

<template>
  <button @click="hello = !hello">Toggle</button>
  <Component :is="component" /> // not work. If it change to <component />, it works
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue";
import ByeWorld from "./components/ByeWorld.vue";
export default {
  name: "App",
  components: {
    HelloWorld,
    ByeWorld,
  },
  data() {
    return {
      hello: true,
    };
  },
  computed: {
    component() {
      return this.hello ? "HelloWorld" : "ByeWorld";
    },
  },
};
</script>

What is expected?

Component appear.

What is actually happening?

no error in console. and show nothing

@HcySunYang HcySunYang added 🐞 bug Something isn't working 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Mar 29, 2021
cathrinevaage added a commit to cathrinevaage/vue-next that referenced this issue Mar 29, 2021
@danyadev
Copy link

#1167

image

@KunHwanAhn
Copy link

interesting 🤔

at the following comment, only lowercase is allowed.
#1167 (comment)

But, PR #3508 make <Component> allowed.. 🤔

@HcySunYang
Copy link
Member

That should be a misunderstanding, because Vue2 allows a capitalized version, so we should keep that behavior.

@HcySunYang
Copy link
Member

And sorry to @danyadev for that

@KunHwanAhn
Copy link

KunHwanAhn commented Mar 30, 2021

So... does it means that this issue is not an issue?

Vue3 DO NOT allow Pascal Case, <Component>?

@KunHwanAhn
Copy link

That should be a misunderstanding, because Vue2 allows a capitalized version, so we should keep that behavior.

Ah, I understood, Vue3 allow <Component> case as well.

@yyx990803
Copy link
Member

Yeah, I closed #1167 without checking Vue 2 behavior, which was a mistake.

Since uppercase <Component :is> does work in Vue 2, we are keeping it consistent in Vue 3.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. 🐞 bug Something isn't working
Projects
None yet
5 participants