Skip to content

v5.0.0

Compare
Choose a tag to compare
@chrisbianca chrisbianca released this 21 Jan 15:51
· 72 commits to master since this release

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