tiefenb tiefenb - 3 months ago 52
React JSX Question

Reacts this.props.children in vue.js component

React has something like

this.props.children
: https://facebook.github.io/react/tips/children-props-type.html

Does Vue.js have also some similar to access the child-elements?

Answer

Vue.js has this.$children, which also gives you an array of child components

http://vuejs.org/api/#vm-children

If you want to reference specific components, you might want to use v-ref and this.$refs