I'm a bit new with vue.js but still...I don't understand the behavior. Could someone explain why when I use a variable after "this.$refs.somevariable", I have an undefined result, but if I use the value of the variable, then it works ?:
<script>
export default {
    
  mounted() {
    //
  },
  methods: {
      scrollTo: function(anchor) {
        console.log(anchor); // "whoAreWe"
        console.log(this.$refs.anchor); // Undefined
        console.log(this.$refs.whoAreWe); //the DOM div "whoAreWe"
      
      }
    },
};
</script>
<template>
   ...
<button
    type = "button"
    @click = scrollTo('whoAreWe')>
    **Click!**
</button>  
...
<div ref="whoAreWe">
<div>
</template>
 
    