[Vuejs]-Vue Component props value is does not seem on template

0👍

Your main.js and index.html shouldn’t mix template in HTML and render function. So your main.js should be:

```new Vue({
  el: '#user',
  components: { User },
  data() {
      return {
         groups: []
      }
  },
...```
  1. You shouldn’t directly reassign data value because Vue cannot detect property additions and rerender view. You should do it via Vue.set or this.$set like this:

    this.$set(this, 'groups', response.data)

You can read more about how vue reactive in https://v2.vuejs.org/v2/guide/reactivity.html and Vue.set API: https://v2.vuejs.org/v2/api/#Vue-set

0👍

Seems like you are putting 2 Vue instances on the same template since in your main file you are defining the template as el: "#user" which is already controlled by User.vue.

In you index.html add a div with id="app" and in main.js set el: "#app"

👤Tomer

Leave a comment