title: vuejs - npm run dev webserver auto refresh works when I save a file, but refreshing the browser does not
body: <p>I'm very new to VueJS but loving the possibilities. I started with one of my easier projects (single page php/jquery app) and have been working on converting it to VueJS/Webpack. It's basically a table that grabs json data into an array and populates a table and has filter controls.  The drop down controls that filter are populated by unique values from a json field.  That's what I'm currently working on (already got the json call and table working, along with modals that appear when you click on a table row).</p>
  
  <p>What I'm noticing that is strange, is if I'm working and I save my work in my IDE (vscode) and the localwebserver refreshes my page, I see what is expected in my code to happen.  However if I click REFRESH in my browser again, nothing works as expected.  A good example is in one of my components, I'm building an array to use in my drop down controls.  I'm outputting the array I'm using to populate my drop down using <code>console.log()</code> to make sure it works as I hope, and when I just save the file in vscode, it outputs the data correctly in the browser.  If I immediately refresh my page in browser, it doesn't output the array as it just did, and instead I see <code>[__ob__: Observer]</code> with a <code>length:0</code> where my array was previously output due to the console.log().  It also doesn't populate my dropdown..  Is this expected behavior?</p>
  
  <p>Using npm with webpack and (for the first time ever) the built in webserver and compiler.  I'm using the single page approach, <code>App.vue</code>, and I have 3 components in that <code>App.vue</code>.  I'm filling an array named <code>fans</code> using json data (on my <code>mounted()</code> hook) and passing it as a prop into each component.  Here is my <code>App.vue</code>:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt;
        &lt;fan-modals v-bind:fans="fans"&gt;&lt;/fan-modals&gt;
  
        &lt;div class="container"&gt;
            &lt;filter-controls v-bind:fans="fans"&gt;&lt;/filter-controls&gt;
            &lt;fans v-bind:fans="fans"&gt;&lt;/fans&gt;
        &lt;/div&gt;  &lt;!-- end #container --&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
    import FilterControls from './components/FilterControls.vue';
    import Fans from './components/Fans.vue';
    import FanModals from './components/FanModals.vue';
  
    export default {
      name: 'app',
      data: function() {
        return {
          fansUrl: 'example.com',
          fans: []
        }
      },
      components: {
        filterControls: FilterControls,
        fans: Fans,
        fanModals: FanModals
      },
      methods: {
      },
      mounted() {
          var self = this;
          $.getJSON(self.fansUrl, function(data){
              self.fans = data;
          });
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The component that is giving me problems output is my <code>FilterControls</code> component, seen here (I left out all other controls for brevity):</p>
  
  <pre><code>&lt;template&gt;
  
          &lt;div class="row"&gt;
              &lt;div class="col-xs-6 col-sm-6 control-wrap"&gt;
                  &lt;select id='selectVoltage' class='form-control' v-model="voltageArray"&gt;
                  &lt;option&gt;Voltage&lt;/option&gt;
                  &lt;option v-for="(voltage, index) in voltageArray" :key="index" v-bind:value="voltage"&gt;
                      {{ voltage }}
                  &lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class="col-xs-6 col-sm-6 control-wrap"&gt;
                  &lt;select id='selectMaxRPM' class="form-control"&gt;
                  &lt;option&gt;Max RPM&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/template&gt;
  
  &lt;script&gt;
      export default {
          data: function() {
              return {
                  voltageArray: [],
              }
          },
          props: {
              fans: {
                  type: Array,
                  required: false
              }
          },
          methods: {
              populateControls() {
                  var vi = this;
                  console.log("populateControls() called ");
                  if (vi.fans) {
                      console.log("there are fans ");
  
                      var voltage = [];
  
                      $.each(vi.fans, function(index, value) {
                          voltage.push(vi.fans[index].voltage);
  
                      });
  
                      vi.voltageArray = $.unique(voltage);
  
                      console.log(vi.voltageArray);
                  }
  
              }
          },
          mounted() {
              this.populateControls();
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm passing the same array I use to populate my table as a prop to the component.</p>
  
  <p>When I save my work and it's auto refreshed in the browser it works.  When I refresh the page in the browser it doesn't. I'm baffled.</p>