[Vuejs]-How can I bind a ref to a Pinia state variable through an action, in Vue 3?

0👍

Ah, I neglected to use $patch. This worked for me:

setUserData(uid) {  
  const user = useFirestore(doc(db, "users", uid));
  this.$patch({ userData: user });
}

If I’m using this in the wrong way, please let me know.

Leave a comment