invertase / invertase/tanstack-query-firebase

Dependency issue

Open
#81 1 comment 0 reactions 0 assignees View on GitHub
react-query-firebase
Dominant language
TypeScript
Stars
462
Forks
69
PR merge metrics
No merged PRs in 30d

Description

```
const Register = () => {

const {data} = useAuthUser(["user"], auth)

const ref = doc(usersDb, data.uid)
const addOtherFields = useFirestoreDocumentMutation(ref)

const newUser = useAuthCreateUserWithEmailAndPassword(auth, {
onSuccess(){
addOtherFields.mutate({name: "jhon Smith", age:20})
}
})

const submit = () => {
newUser.mutate({ email: "john9989@gmail.com", password: "123456" });
};

return (


register

);
};

export default Register;
```

how can I use the uid of the user in the doc reference path.
I am trying to add additional data about the user in a `users` collection.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.