@umituz/react-native-firebase 1.13.9 → 1.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-firebase",
3
- "version": "1.13.9",
3
+ "version": "1.13.10",
4
4
  "description": "Unified Firebase package for React Native apps - Auth and Firestore services using Firebase JS SDK (no native modules).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -55,15 +55,12 @@ export function useFirebaseAuth(): UseFirebaseAuthResult {
55
55
  }
56
56
 
57
57
  // Subscribe to auth state changes
58
+ // onAuthStateChanged fires immediately with current user, then on every change
58
59
  const unsubscribe = onAuthStateChanged(auth, (currentUser: User | null) => {
59
60
  setUser(currentUser);
60
61
  setLoading(false);
61
62
  });
62
63
 
63
- // Set initial state
64
- setUser(auth.currentUser);
65
- setLoading(false);
66
-
67
64
  return () => {
68
65
  unsubscribe();
69
66
  };