Releases: CSFrequency/react-firebase-hooks
Releases · CSFrequency/react-firebase-hooks
v3.0.4
v3.0.3
Release Notes
New features
- [auth] Add support for
emailVerificationOptions
when usinguseCreateUserWithEmailAndPassword
(#125 and #130) - thanks to @dohomi
Bug fixes
- [database] Correctly type
refField
asReference
- [firestore] Correctly type
refField
asDocumentReference
(#126 ) - thanks to @dangreaves - [firestore] Correctly support
withConverter
(#129) - thanks to @berdyshev
v3.0.2
Release Notes
Bug fixes
- [auth] Remove unnecessary
firebase/auth
import to reduce bundle size (#122) - thanks to @exKAZUu - [firestore] Fix issues with
DocumentData
typescript 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-hooks
requires Firebase v8 or higher (#86) - thanks to @mdirolf
New Features
- [auth] Add
useCreateUserWithEmailAndPassword
anduseSignInWithEmailAndPassword
hooks (#98) - thanks to @lorstenoplo - [database] Add
transform
option for realtime database hooks (#95) - thanks to @Satyam - [firestore] Add an optional
refField
that is populated with thefirebase.firestore.QuerySnapshot.ref
property (#80) - thanks to @mauriceackel - [firestore] Add support for
snapshotOptions
(#78) - [firestore] Add
transform
option for firestore hooks
Performance Improvements
- Responses from all hooks are now memoized to prevent unnecessary renders (#79) - thanks to @sdemjanenko
- [database] Improve
useList
efficiency (#90) - thanks to @caleb-harrelson
Typing Improvements
- [auth] Fix return type for
useAuthState
(#107) - thanks to @kqito - [database] Add
keyField
andrefField
to generics - [firestore] Add generics to allow the returned data to be typed (#75) - thanks to @Lynges
- [firestore] Add
idField
andrefField
to generics (#50) - [firestore] Add additional
firestore.DocumentReference
type 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
options
object parameter which contains all optional parameters:-
Firestore:
useCollection(query, options)
is nowuseCollection(query, { snapshotListenOptions })
useCollectionOnce(query, options)
is nowuseCollectionOnce(query, { getOptions })
useCollectionData(query, options, idField)
is nowuseCollectionData(query, { idField, snapshotListenOptions })
useCollectionDataOnce(query, options, idField)
is nowuseCollectionDataOnce(query, { getOptions, idField })
useDocument(ref, options)
is nowuseDocument(ref, { snapshotListenOptions })
useDocumentOnce(ref, options)
is nowuseDocumentOnce(ref, { getOptions })
useDocumentData(ref, options, idField)
is nowuseDocumentData(ref, { idField, snapshotListenOptions })
useDocumentDataOnce(ref, options, idField)
is nowuseDocumentDataOnce(ref, { getOptions, idField })
-
Database:
useListVals<T>(ref, keyField)
is nowuseListVals<T>(ref, { keyField })
useObjectVal<T>(ref, keyField)
is nowuseObjectVal<T>(ref, { keyField })
-
- Auth hooks now return
firebase.auth.Error
rather thanfirebase.FirebaseError
as this is what theauth
methods return from the SDK - Firestore hooks now return
Error
rather thanfirebase.FirebaseError
as this is what thefirestore
methods 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
FirebaseError
rather thanobject
type - thanks @lucacasonato - #19 Return null instead of empty object when document doesn't exist - thanks @cmmartin