Open dmolinae opened 5 years ago
it works on every other reload, this is because RN is only calling dealloc every-other reload. Working on a fix but it's a hack around RN
Finally, I use a temporary solution by importing the Firebase Web SDK for the .auth() class...
Working without problems.
Like this:
import * as firebase from 'firebase';
import firestore from 'firebase/firestore'
const settings = {timestampsInSnapshots: true};
const config = { [firebaseConfig] }
firebase.initializeApp(config);
firebase.firestore().settings(settings);
onAuthStateChanged = (callback) => {
firebase.auth().onAuthStateChanged(callback);
}
I'm having the same issue which is really annoying during development. I'd like to avoid importing Web SDK. Can you share your fix @EvanBacon? Even if that's a workaround. Thanks a lot in advance.
I can use all firebase SDKs without problems.
I call
onAuthStateChanged
like so in my app.When I first start up the app, the callback in
onAuthStateChanged
triggered fine. However, if I do a reload of the app by saving any file inside the proyect, it doesn't call the callback anymore.If I close and reopen the app, then it works again.