samedi 7 octobre 2017

Firebase Web Transactions applyLocally not suppressing initial local events

So since I've started using Firebase Web Transactions within the Firebase Cloud Functions environment I haven't been able to have the third parameter 'applyLocally' work correctly. I've been setting it to false to suppress getting the initial null value incase the data that is gotten from the transaction is actually null itself. When I run the code after deploying it, it passes null to the update function, but when I run the code again without a new deploy to Cloud Functions, THEN it suppresses all local events and I only see my data.

Q: Is the transaction parameter 'applyLocally' set to false supposed to suppress locally cached values every time when applyLocally is set to false, or is it built so that after the initial code deploy you will get null as a value passed to the update function?

The reason why I'm asking this question is because if the locally cached values aren't suppressed every time, then I would have to account for that initial intermediate state, whereas then I don't understand why I should use applyLocally at all. Also because I didn't see anything elaborating within the docs.

The docs I've read through are: http://ift.tt/2fGV8hq

http://ift.tt/2wFPPG5

If code is needed then let me know. Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire