Skip to content
Advertisement

Tag: firebase

React native firebase handling payment flow

I am integrating payment api, I’m using firebase cloud functions as my backend and react-native in frontend, so right now i have the following code: In react-native side: firebase function to handle payment: So the question is, how can I handle long-time response/timeout error/network-loss etc in react-native side, like how should I make it more robust? especially handling long-time responses,

Firebase Firestore returns [object Object] instead of instead of a plain object

I have a custom hook called useDocument.js below which fetches the data from a firestore collection via a specific ID. Why is it that it’s returning [object Object] instead of plain object. I’ve tried accessing the name property and logging it to the console using document.name but throws up an error: Uncaught TypeError: Cannot read properties of null (reading ‘name’)

Advertisement