title: How do I load firebase data using vue and vuefire?
body: <p>I'm not understanding something about getting firebase data into vue... I'm happy to delete the question or quit my job as a programmer once I get an answer ;)</p>
  
  <p>I get that the data is async, so vue is trying to render the component before the data has been received. But, I don't see how to make it wait. Examples would be greatly appreciated. I've tried reading the docs, but I'm just not understanding.</p>
  
  <p>It's a tiny tiny app that displays our company's parking lot and saves the user's tap (car) location to firebase (we're tired of forgetting where we parked). Grateful for any help!</p>
  
  <p>Oh, and I'm using set() because only one car location needs to be saved at a time, so it's ok that the data is overwritten each time the user taps a new place on the screen.</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="app"&gt;
      &lt;span id="marker" class="fas fa-times" :style="{ left: leftCoord, top: topCoord }"&gt;&lt;/span&gt;
      &lt;img @click="saveCoordinates($event)" src="./assets/parking-lot.jpg"&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import firebase from 'firebase'
  
  const config = {
    apiKey: 'MY-API-KEY',
    authDomain: 'MY-APP.firebaseapp.com',
    databaseURL: 'https://MY-APP.firebaseio.com',
    projectId: 'MY-APP',
    storageBucket: 'MY-APP.appspot.com',
    messagingSenderId: '1234567890'
  }
  const app = firebase.initializeApp(config)
  
  const db = app.database()
  const locationRef = db.ref('location')
  
  export default {
    name: 'app',
    firebase: {
      location: locationRef
    },
    mounted () {
      this.leftCoord = this.location.leftCoord
      this.topCoord = this.location.topCoord
    },
    data () {
      return {
        leftCoord: '',
        topCoord: ''
      }
    },
    methods: {
      saveCoordinates: function (clickEvent) {
        const coordinates = {
          leftCoord: clickEvent.layerX,
          topCoord: clickEvent.layerY
        }
        this.location.set(coordinates)
      }
    }
  }
  &lt;/script&gt;
  </code></pre>