Get single record from Firestore using Vue.js
Clash Royale CLAN TAG #URR8PPP Get single record from Firestore using Vue.js I am trying to get a single record from a Firestore db where I am pulling the ID from the path but it doesn't seem to be working. When I console log I get nothing at all in the log so not sure why the created code doesn't seem to be running Can you see what I am doing wrong please // Import firestorm Database import db from '~/services/fireinit.js' export default { data() { return { post: } }, created() { let ref = db.collection('post').doc(this.$route.params.id) ref.get() .then(snapshot => { snapshot.forEach(doc => { let post = doc.data() console.log(post) }) }) } I should add that get all works fine db.collection('post').get() my console.log returns nothing even if I add a string to it so it doesn't appear this block of code is running, but I have no errors at all in the console. ...