mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
[internals] Move native events to individual modules to make it easier to see the relationship
This commit is contained in:
@@ -34,6 +34,11 @@ type DocumentSyncEvent = {
|
||||
path: string,
|
||||
}
|
||||
|
||||
const NATIVE_EVENTS = [
|
||||
'firestore_collection_sync_event',
|
||||
'firestore_document_sync_event',
|
||||
];
|
||||
|
||||
/**
|
||||
* @class Firestore
|
||||
*/
|
||||
@@ -44,7 +49,7 @@ export default class Firestore extends ModuleBase {
|
||||
_referencePath: Path;
|
||||
|
||||
constructor(firebaseApp: FirebaseApp, options: Object = {}) {
|
||||
super(firebaseApp, options, true);
|
||||
super(firebaseApp, options, NATIVE_EVENTS);
|
||||
this._referencePath = new Path([]);
|
||||
|
||||
SharedEventEmitter.addListener(
|
||||
|
||||
Reference in New Issue
Block a user