react-firebase-hooks

React Hooks for Firebase.

APACHE-2.0 License

Downloads
256.3K
Stars
3.6K
Committers
59

Bot releases are visible (Hide)

react-firebase-hooks -

Published by chrisbianca over 5 years ago

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

  • Flow type fixes - thanks @tornewuff
react-firebase-hooks -

Published by chrisbianca over 5 years ago

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
react-firebase-hooks -

Published by chrisbianca over 5 years ago

Updates

  • peerDependencies updated to React v16.8.0
  • Updated documentation
react-firebase-hooks -

Published by chrisbianca almost 6 years ago

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
react-firebase-hooks -

Published by chrisbianca almost 6 years ago

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
react-firebase-hooks -

Published by chrisbianca almost 6 years ago

Bug fixes

  • #1 useAuthState initialising not working
react-firebase-hooks -

Published by chrisbianca almost 6 years ago

New Features

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

Published by chrisbianca almost 6 years ago

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