Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.8k
Rename createComponent to defineComponent#549
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
|
How about just import{component}from'vue'constApp=component({// ...}) |
I was thinking this exact thing. |
chrisvfritz commentedDec 20, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm good with I worry that |
CyberAP commentedDec 20, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
True that, trying to google what does Vue.component do could lead to irrelevant results. Also JSFiddle and Codepen projects extensively use that to play with components. |
@CyberAP That's true! Googling |
Ok in this case I'm fine with
|
BinarySpike commentedSep 6, 2020
Reading some guides online that have
Saw the merge and thought, "I wonder if it's renamed" and yes it is. 👍 The correct import is
I guess I should have read this first:https://v3.vuejs.org/guide/typescript-support.html#defining-vue-components |
I think "define" is more accurate than "create" in this case, since nothing is really being created per se - the function just returns the same object. But itis useful for defining a component, to get better typings.
I think it would also be helpful to reserve the "define" prefix (or some other verb) for any future functions that only exist for typings, to help differentiate them from functions that create a new instance of something.
Thoughts?