I understand that when the data changes in FireStore, AddsnapshotListener gets triggered in realtime.
However, I'm not sure which function gets triggered by that, in the below code.
Is it only function C that gets triggered? or all the functions?
If all functions run, what happens to the argument of the function A??
func C() {
print("C")
deckDocRef.addSnapshotListener { snapShot, err in
...
}
}
func B() {
print("func B")
C()
}
func A(a: Bool) {
if a {
print("a")
B()
} else {
print("b")
}
}