I have a problem with Firebase in my React Native app. I've found a quick fix online, but it's written in Firebase Web version 8 syntax:
firebase.firestore().settings({ experimentalForceLongPolling: true, merge: true });
How can I rewrite it in Version 9 syntax?
You need to pass your settings to the initializeFirestore(app, settings)
method.
As you will read on this doc page :
initializeFirestore(app, settings)
initializes a new instance of Firestore with the provided settings. Can only be called before any other function, includinggetFirestore()
. If the custom settings are empty, this function is equivalent to callinggetFirestore()
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.