vue.jsvuejs2vue-devtools

Vuejs : is it possible to name Vue instances in vue-devtools?


I'm implementing a web page with multiple Vue instances.

I have a simple question : is it possible to name and display them under their name with vue-devtools?

Actually my console displays instances like this and it is hard to distinguish them :

vue-devtools


Solution

  • By "multiple instances of Vue", if you mean you have multiple new Vue({}) instances, then you can give each its own name as:

    new Vue({
      name: 'Samayo'
    })
    

    And now the <Root> in your devtools will be replaced with <Samayo>