Skip to content

Releases: CSFrequency/react-firebase-hooks

v5.1.1

15 Nov 08:47
Compare
Choose a tag to compare

Release Notes

Bug fixes

Full Changelog: v5.1.0...v5.1.1

v5.1.0

09 Nov 10:44
Compare
Choose a tag to compare

Release Notes

It's been a while since the last release, so this has been a bit of a housekeeping release focused on landing outstanding PRs and resolving a few of the simpler issues that have been reported.

I'm aware there are some outstanding issues with React 18 that require some deeper investigation and these will be tackled in a future release.

Special thanks to @levino for putting a test framework in place and adding our first test. We would welcome PRs with additional tests to improve the resilience of the library!

New Hooks

  • [auth] Add useSendPasswordResetEmail - thanks to @mparsakia
  • [auth] Add useDeleteUser - thanks to @RobertSasak
  • [auth] Add useSignOut - thanks to @RobertSasak
  • [auth] Add useVerifyBeforeUpdateEmail - thanks to @skratchdot
  • [auth] Add useIdToken #223
  • [auth] Add useSendSignInLinkToEmail and useSignInWithEmailLink #261

New Features

  • [auth] useCollection and useDocument now supports an optional initialValue option which sets the default value for hooks. This had been missed in the upgrade from v3 to v4 - thanks to @mauriceackel and @dylanwatsonsoftware
  • [auth] All methods returned by the createUser and signInWithXXX hooks will return the UserCredential when successful #251
  • [auth] All methods returned by updateXXX and sendXXX hooks will return a boolean to indicate success or failure

Bug fixes

  • Ensure that all internal functions are wrapped in useCallback to prevent unnecessary renders - thanks to @wong2 and @pzmudzinski

Full Changelog: v5.0.3...v5.1.0

v5.0.3

23 Feb 12:31
Compare
Choose a tag to compare

Release Notes

Bug fixes

  • [auth] Correctly clear the error message when re-submitting the update functions #213 - thanks @cargallo
  • [functions] Fix HttpsCallable return type #210 - thanks @sanny-io

v5.0.2

04 Feb 17:29
Compare
Choose a tag to compare

Release Notes

Bug fixes

  • [firestore] Prevent unnecessary re-renders when specifying options to hooks #207

v5.0.1

31 Jan 14:55
Compare
Choose a tag to compare

Release Notes

Bug fixes

  • [auth] Remove unnecessary check to see if user is logged in with useSendPasswordResetEmail #205

v5.0.0

21 Jan 15:51
Compare
Choose a tag to compare

Release Notes

This is one of the biggest releases for a while, bringing a raft of simplifications to the underlying code and a number of new hooks to support a greater breadth of Firebase functionality.

Breaking Changes

  • [firestore] useCollectionData and useDocumentData hooks no longer supports idField, refField or transform options as these are incompatible with the new Firebase v9 typings. Instead, use the built in FirestoreDataConverter functionality to control how the snapshots returned by Firebase are converted.
  • [typings] Flow typings have been removed as they were wildly out of date

New Hooks

  • [auth] Add a number of social login hooks: useSignInWithApple, useSignInWithFacebook, useSignInWithGithub, useSignInWithGoogle, useSignInWithMicrosoft, useSignInWithTwitter and useSignInWithYahoo - thanks to @isaiah-solo for the original useSignInWithGoogle hook that was adapted.
  • [auth] Add a number of user update hooks: useUpdateEmail, useUpdatePassword and useUpdateProfile
  • [auth] Add a couple of email hooks: useSendPasswordResetEmail and useSendEmailVerification
  • [functions] Add the useHttpsCallable hook to allow callable Cloud Functions to be executed
  • [messaging] Add the useToken hook to allow access to the Cloud Messaging token
  • [storage] Add the useUploadFile hook to allow files to be uploaded to Cloud Storage - thanks to @dohomi for the inspiration

New Features

  • [auth] useAuthState now supports an optional onUserChanged option to allow custom functions to be called when a user changes, e.g. to access custom claims (#139) - thanks to @dohomi
  • [firestore] useCollectionData and useDocumentData now return the snapshot object to allow access to things like metadata
  • [firestore] use***Once hooks now return a reload function to allow manual reloading of the data

Bug fixes

  • [firestore] use***Once hooks now protect against race conditions (#201) - thanks to @mrtnkb

Full Changelog: v4.0.1...v5.0.0

v4.0.2

11 Jan 17:01
Compare
Choose a tag to compare

Release Notes

Bug fixes

  • [firestore] Add inactive request protection to Firestore *Once methods (#201, fixes #194) - thanks to @mrtnkb

v3.0.5

21 Dec 15:53
Compare
Choose a tag to compare

Release Notes

New features

v4.0.1

08 Nov 17:37
Compare
Choose a tag to compare

Release Notes

Bug fixes

  • [firestore] Update snapshot.exists to a method call (#179) - thanks to @dsvgit

v4.0.0

01 Nov 08:56
Compare
Choose a tag to compare

Release Notes

A big thank you to @andipaetzold who made the underlying changes for this release.

Breaking Changes

  • This release updates react-firebase-hooks to support Firebase v9, the new modular SDK from Firebase. Whilst there should be no changes required to the way that you interact with react-firebase-hooks, a number of changes will need to be made to how you interact with the underlying Firebase SDKs. More can be found here.