I can quite easily find how to add triggers for firestore events but I can't find any documentation on how to use firebase functions to write to firestore.
For example I have the following:
export const listener = functions.auth.user().onCreate((x)=>{
//firestore function to add an entry for user with fields...
})
There doesn't seem to be a way to do this? Is it that the logic for adding data to firestore should be written client side? If so wouldn't that mean I would need to re-write that functionality for every platform?