Releases: CSFrequency/react-firebase-hooks
Releases · CSFrequency/react-firebase-hooks
v3.0.4
v3.0.3
Release Notes
New features
- [auth] Add support for emailVerificationOptionswhen usinguseCreateUserWithEmailAndPassword(#125 and #130) - thanks to @dohomi
Bug fixes
- [database] Correctly type refFieldasReference
- [firestore] Correctly type refFieldasDocumentReference(#126 ) - thanks to @dangreaves
- [firestore] Correctly support withConverter(#129) - thanks to @berdyshev
v3.0.2
Release Notes
Bug fixes
- [auth] Remove unnecessary firebase/authimport to reduce bundle size (#122) - thanks to @exKAZUu
- [firestore] Fix issues with DocumentDatatypescript typings (#120) - thanks to @dangreaves for the suggested fix
v3.0.1
Release Notes
Breaking Changes
- Due to changes in the underlying Firebase types, v3 of react-firebase-hooksrequires Firebase v8 or higher (#86) - thanks to @mdirolf
New Features
- [auth] Add useCreateUserWithEmailAndPasswordanduseSignInWithEmailAndPasswordhooks (#98) - thanks to @lorstenoplo
- [database] Add transformoption for realtime database hooks (#95) - thanks to @Satyam
- [firestore] Add an optional refFieldthat is populated with thefirebase.firestore.QuerySnapshot.refproperty (#80) - thanks to @mauriceackel
- [firestore] Add support for snapshotOptions(#78)
- [firestore] Add transformoption for firestore hooks
Performance Improvements
- Responses from all hooks are now memoized to prevent unnecessary renders (#79) - thanks to @sdemjanenko
- [database] Improve useListefficiency (#90) - thanks to @caleb-harrelson
Typing Improvements
- [auth] Fix return type for useAuthState(#107) - thanks to @kqito
- [database] Add keyFieldandrefFieldto generics
- [firestore] Add generics to allow the returned data to be typed (#75) - thanks to @Lynges
- [firestore] Add idFieldandrefFieldto generics (#50)
- [firestore] Add additional firestore.DocumentReferencetype information to all hooks (#67)
v3.0.0
v2.2.0
v2.1.1
v2.1.0
v2.0.0
Release Notes
Breaking Changes
- All hooks now return an array rather than an object to enable easier composition of hooks. The structure of this array is generally:
const [value, loading, error] = useHook();
- Any hooks with optional parameters now have a single optionsobject parameter which contains all optional parameters:- 
Firestore: - useCollection(query, options)is now- useCollection(query, { snapshotListenOptions })
- useCollectionOnce(query, options)is now- useCollectionOnce(query, { getOptions })
- useCollectionData(query, options, idField)is now- useCollectionData(query, { idField, snapshotListenOptions })
- useCollectionDataOnce(query, options, idField)is now- useCollectionDataOnce(query, { getOptions, idField })
- useDocument(ref, options)is now- useDocument(ref, { snapshotListenOptions })
- useDocumentOnce(ref, options)is now- useDocumentOnce(ref, { getOptions })
- useDocumentData(ref, options, idField)is now- useDocumentData(ref, { idField, snapshotListenOptions })
- useDocumentDataOnce(ref, options, idField)is now- useDocumentDataOnce(ref, { getOptions, idField })
 
- 
Database: - useListVals<T>(ref, keyField)is now- useListVals<T>(ref, { keyField })
- useObjectVal<T>(ref, keyField)is now- useObjectVal<T>(ref, { keyField })
 
 
- 
- Auth hooks now return firebase.auth.Errorrather thanfirebase.FirebaseErroras this is what theauthmethods return from the SDK
- Firestore hooks now return Errorrather thanfirebase.FirebaseErroras this is what thefirestoremethods return from the SDK
New Features
- Overhauled documentation to make it easier to read
- Reworked behind the scenes to better re-use code
v1.2.1
Bug fixes
- #18 Return FirebaseErrorrather thanobjecttype - thanks @lucacasonato
- #19 Return null instead of empty object when document doesn't exist - thanks @cmmartin