npm react-firebase-hooks 0.3.0

latest releases: 5.1.1, 5.1.0, 5.1.0-alpha.9...
7 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

Don't miss a new react-firebase-hooks release

NewReleases is sending notifications on new releases.