reactfire 4.2.2-exp.414201e → 4.2.3-exp.1769cfb

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,5 +1,5 @@
1
1
  {
2
- "version": "4.2.2-exp.414201e",
2
+ "version": "4.2.3-exp.1769cfb",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.cjs",
@@ -36,7 +36,7 @@
36
36
  "docs:fork": "typedoc --options typedoc.json --gitRemote upstream && markdown-toc -i docs/use.md"
37
37
  },
38
38
  "peerDependencies": {
39
- "firebase": "^9.0.0",
39
+ "firebase": "^9.0.0 || >=9.11.0-20220929164943 || next",
40
40
  "react": ">=16 || experimental"
41
41
  },
42
42
  "husky": {
package/src/auth.tsx CHANGED
@@ -24,15 +24,8 @@ export function useUser<T = unknown>(options?: ReactFireOptions<T>): ObservableS
24
24
 
25
25
  const observableId = `auth:user:${auth.name}`;
26
26
  const observable$ = user(auth);
27
- const _options: ReactFireOptions<T> = { ...options } ?? {};
28
27
 
29
- // only set/override initialData if auth has finished loading
30
- if (auth.currentUser !== undefined) {
31
- _options.initialData = auth.currentUser;
32
- _options.startWithValue = auth.currentUser;
33
- }
34
-
35
- return useObservable(observableId, observable$, _options);
28
+ return useObservable(observableId, observable$, options);
36
29
  }
37
30
 
38
31
  export function useIdTokenResult(user: User, forceRefresh: boolean = false, options?: ReactFireOptions<IdTokenResult>): ObservableStatus<IdTokenResult> {
@@ -180,7 +173,7 @@ export function useSigninCheck(
180
173
  })
181
174
  );
182
175
 
183
- return useObservable(observableId, observable);
176
+ return useObservable(observableId, observable, options);
184
177
  }
185
178
 
186
179
  function getClaimsObjectValidator(requiredClaims: Claims): ClaimsValidator {
package/src/firestore.tsx CHANGED
@@ -35,7 +35,7 @@ function getDocObservableId(ref: DocumentReference) {
35
35
  }
36
36
 
37
37
  /**
38
- * Suscribe to Firestore Document changes
38
+ * Subscribe to Firestore Document changes
39
39
  *
40
40
  * You can preload data for this hook by calling `preloadFirestoreDoc`
41
41
  */
@@ -57,7 +57,7 @@ export function useFirestoreDocOnce<T = DocumentData>(ref: DocumentReference<T>,
57
57
  }
58
58
 
59
59
  /**
60
- * Suscribe to Firestore Document changes and unwrap the document into a plain object
60
+ * Subscribe to Firestore Document changes and unwrap the document into a plain object
61
61
  */
62
62
  export function useFirestoreDocData<T = unknown>(ref: DocumentReference<T>, options?: ReactFireOptions<T>): ObservableStatus<T> {
63
63
  const idField = options ? checkIdField(options) : 'NO_ID_FIELD';