问题描述:

I'm trying to make my first web app with vue.js and Firebase.

I would like to understand which is the best method for querying filtered for uid.

This is my code:

let tags = {}

Firebase.auth().onAuthStateChanged(function (user) {

if (user) {

let user = Firebase.auth().currentUser

Firebase.database().ref('users/' + user.uid + '/tag').on('value', snapshot => {

tags = snapshot.val()

})

}

})

There is a more structured approach?

Does anyone have any example links?

相关阅读:
Top