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

Add documentation for $createElement() to the API docs #658

Open
sqal opened this issue Dec 15, 2016 · 7 comments
Open

Add documentation for $createElement() to the API docs #658

sqal opened this issue Dec 15, 2016 · 7 comments

Comments

@sqal
Copy link

sqal commented Dec 15, 2016

I don't see anywhere vm.$createElement being mentioned in the docs It's not a private function, right? judging from this comment

@LinusBorg
Copy link
Member

Hm ... It's not a private function really, no.

It probably slipped through because the only real use for it is in the render function, to which it is passed as the argument anyway:

https://vuejs.org/v2/api/#render

But it might be worth documenting.

@sqal
Copy link
Author

sqal commented Dec 16, 2016

the only real use for it is in the render function, to which it is passed as the argument anyway:

Agree, but sometimes render logic can be very complex so it's useful to move some of the code to the custom method function. Then you have 2 choices, a) pass the createElement from the render down to the method or b) just use this.$createElement

@LinusBorg LinusBorg changed the title No mention of $createElement in the API? Add documentation for $createElement() to the API docs Dec 16, 2016
@AlexandreBonaventure
Copy link

Some third party plugins are using this API : see element-ui

@lzhoucs
Copy link

lzhoucs commented Aug 22, 2018

It seems vuetify is also one of them: https://github.com/vuetifyjs/vuetify/blob/dev/src/components/VDataTable/mixins/body.js#L9

@dohomi
Copy link

dohomi commented Aug 30, 2018

It would be great to document it - just found out about it on accident. Very useful helper for JS based components

@AlbertMarashi
Copy link

Why hasn't this been documented yet?

@MrJmpl3
Copy link

MrJmpl3 commented Sep 14, 2019

I searching why Vuetify use "this.$createElement" without jsx babel, and now finding the why!
 
The documentation is missing this attribute. u.u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants