Skip to content
Advertisement

Tag: firebase

Change the field value in Firestore automatically after a certain time [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m working on Javascript and here’s how’s my data looks like. I want the functionality where after every 24 hours,

How to get FCM token?

I am trying to get FCM token in react js application. First thing i tried is to use messaging.useServiceWorker(registration) then use messaging.getToken() and it’s working fine on localhost for firefox and google chrome, but on an HTTPS live server it works fine on firefox but in chrome it throws an error: DOMException: Failed to execute ‘subscribe’ on ‘PushManager’: Subscription failed

Method for coverting all Firestore Timestamps in a snapshot to JS dates?

How would you write a method to convert all Firestore Timestamps in a snapshot to JavaScript Dates? For example, a snapshot from a posts collection might return a couple Firestore Timestamps (createdDtTm, modifyDtTm): Converting the individual dates is simple enough by mapping over the array and using the toDate() method for each Timestamp (e.g., createDtTm.toDate()) But what is a more

Advertisement