Skip to content

Releases: CSFrequency/react-firebase-hooks

v1.2.0

18 Apr 08:51
Compare
Choose a tag to compare

New Features

  • Add useCollectionData and useDocumentData hooks for react-firebase-hooks/firestore to use the underlying snapshot values
  • Add useCollectionOnce, useCollectionDataOnce, useDocumentOnce and useDocumentDataOnce to load the current value of the data rather than subscribe to updates
  • Add support for nulled references as hook properties #10 - thanks @neilor
  • Add support for keyField to useListVals and useObjectVal

Bug fixes

v1.1.0

14 Feb 15:42
Compare
Choose a tag to compare

Bug fixes

  • #6 loading should be set to true when reset
  • Updated how the default value is calculated to ensure that it is up to date when reset

v1.0.0

06 Feb 17:56
Compare
Choose a tag to compare

Updates

  • peerDependencies updated to React v16.8.0
  • Updated documentation

v0.5.0

18 Jan 10:49
Compare
Choose a tag to compare

Updates

  • useAuthState now takes the current value of auth.currentUser as the default value. Thanks to @lemol for the contribution.
  • peerDependencies now supports React v16.8.0-alpha.0 upwards

v0.4.0

13 Nov 16:27
Compare
Choose a tag to compare

New Features

  • Add useListKeys hook for react-firebase-hooks/database to use the underlying snapshot keys, rather than the DataSnapshot objects
  • Add useListVal hook for react-firebase-hooks/database to use the underlying snapshot values, rather than the DataSnapshot object

v0.3.2

04 Nov 10:12
Compare
Choose a tag to compare

Bug fixes

  • #1 useAuthState initialising not working

v0.3.1

04 Nov 10:11
Compare
Choose a tag to compare

New Features

  • Add useObjectVal hook for react-firebase-hooks/database to use the underlying value, rather than a DataSnapshot object

v0.3.0

01 Nov 11:34
Compare
Choose a tag to compare

New Features

  • Updated API to make it closer to RxFire
  • Split the library into sub-packages: react-firebase-hooks/auth, react-firebase-hooks/database, react-firebase-hooks/firestore and react-firebase-hooks/storage
  • Added support for multiple Firebase apps and theoretical support for React Native
  • The library is now written in TypeScript and includes TypeScript typings
  • Added Flow typings

Upgrade instructions

If you're already tried out an earlier version of React Firebase Hooks, then a very big thank you!

Unfortunately, this version does introduce some breaking changes:

  • Hooks need to be imported from the appropriate sub-package: react-firebase-hooks/auth, react-firebase-hooks/database, react-firebase-hooks/firestore and react-firebase-hooks/storage
  • useCurrentUser is now useAuthState
  • useDatabaseList is now useList and returns a value prop rather than list to keep it consistent with other hooks
  • useDatabaseValue is now useValue
  • useFirestoreCollection is now useCollection
  • useFirestoreDocument is now useDocument
  • useDownloadURL now returns a value prop rather than url to keep it consistent with other hooks