mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-04 20:11:33 +08:00
[Database] Add more accurate comments of expected behaviour of Reference.on()
This commit is contained in:
@@ -135,14 +135,19 @@ export default class Reference extends ReferenceBase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called once with the initial data at the specified location and then once each
|
||||
* time the data changes.
|
||||
* iOS: Called once with the initial data at the specified location and then once each
|
||||
* time the data changes. It won't trigger until the entire contents have been
|
||||
* synchronized.
|
||||
*
|
||||
* Android: (@link https://github.com/invertase/react-native-firebase/issues/92)
|
||||
* - Array & number values: Called once with the initial data at the specified
|
||||
* location and then twice each time the value changes.
|
||||
* - Other data types: Called once with the initial data at the specified location
|
||||
* and once each time the data type changes.
|
||||
*
|
||||
* @callback onValueCallback
|
||||
* @param {!DataSnapshot} dataSnapshot - Snapshot representing data at the location
|
||||
* specified by the current ref. It won't trigger (.val() won't return a value)
|
||||
* until the entire contents have been synchronized. If location has no data, .val()
|
||||
* will return null.
|
||||
* specified by the current ref. If location has no data, .val() will return null.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user