Created
January 9, 2018 12:34
-
-
Save jacobwyke/8a66ed32bc4cbd0a4d9959f0f28a6fa8 to your computer and use it in GitHub Desktop.
Vue.js component with render function template with props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('greeting', { | |
//Renders: | |
//<p>Hello <name></p> | |
render(createElement) { | |
return createElement( | |
'p', | |
'Hello '+this.name | |
); | |
}, | |
prop: ['name'] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment