The following will only work on a normal reload. I would think this is then a DOM issue, but why would it not work in mounted on load? Appreciate the help!
<f7-page>
<li v-for="city of cities" :key="city['.key']">
{{city.title}} ({{city.startDate}} - {{city.endDate}})
</li>
</f7-page>
</template>
<script>
import { db } from '../firebaseDatabase';
export default {
name: 'Home',
data() {
return {
cities: [],
};
},
mounted() {
var cities = this.cities;
db.collection('cities').where("user", "==", this.$store.getters.user.data.uid)
.get()
.then(get => {
get.forEach(doc => {
cities.push(doc.data())
})
})
.catch(function(error) {
console.log("Error getting documents: ", error);
});
},