I use Firestore with Vue and the problem is: I can't get the data from the database but when I change the :key="Profiles['.key']" to this :key="Profiles" then I see the data on my screen but when I refresh the page the data is gone it doesn't see it any more.
This is the code:
<template>
<div>
<h1 class="text-center mt-16">Admin</h1>
<div v-for="Profiles in Profile" :key="Profiles" class="text-center mt-16">
<p>{{Profiles.username}}</p>
<p>{{Profiles.email}}</p>
<p>{{Profiles.userId}}</p>
<p>{{Profiles.role}}</p>
<p>{{Profiles.haveAccess}}</p>
<p>{{Profiles.createdAt}}</p>
</div>
</div>
</template>
<script>
/*eslint-disable-line*/import { db } from '../../Database';
import firebase from 'firebase';
export default {
data() {
return {
currentUser: firebase.auth().currentUser
}
},
created() {
this.currentUser = firebase.auth().currentUser;
},
firestore: {
Profile: db.collection('Profile')
}
}
</script>


Profile: []and then it works. Thanks for you help.