I ma facing this issue
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
useEffect(() => {
firebase.auth().onAuthStateChanged((user) => {
if (user !== null) {
return firebase
.firestore()
.collection("users")
.doc(user.uid)
.get()
.then((documentSnapshot) => {
if (documentSnapshot.exists) {
setUserData(documentSnapshot.data());
setisloadingComplet(true);
}
});
}
});
}, []);
when ever the user update his info . It does not update immediately until I refresh the app . and it throws me the warning above