Announcing: React Native Firebase version 6.0.0
Late last year we made the decision at Invertase to heavily invest in a revamp of the entire React Native Firebase library and today as announced in the keynote at the Firebase Summit; we're super excited to share with you this new & improved React Native Firebase; version 6.0.0!
> If you're at the Firebase Summit, please come chat with us, we'll be walking around wearing Invertase/React Native Firebase t-shirts.
There's so much to cover so we'll only briefly cover some of our favourites changes. To see all the full changes list check out the changelog.
We've reworked a lot of the core internals and the way they're integrated with a strong focus on improving developer experience;
- Errors: We reworked the way we handle & display errors, e.g. added additional error properties for errors returned from native (e.g. NativeFirebaseError), all native promises rejections now include the JS stack trace of the originating JS code (RN doesn't do this by default).
- Stability: We've added many additional validations for methods alongside many more tests, we have over 1,400 tests now - over double the tests of v5
- Usability: First class TypeScript support; even our reference docs are now directly generated from TypeScript definitions. [Learn More]
- Bundle Sizes: We've split each Firebase service up into its own NPM package, this should result in significant bundle size reductions and allows for greater flexibility to pick & choose the services you require.
- Manual Integration Steps: We also heavily focused on removing or internalising as many manual integration steps required to integrate (e.g. add this line in your X native code file). As a result of this almost all modules are 'install & go', we've also added a way to config native code via a
firebase.jsonfile. Finally; we helped bring about the new auto-linking feature in React Native - we implemented it for Android as part of this effort.
- Documentation: We've built a brand new documentation website with a strong focus on simplicity and using real world examples in all code snippets, there's hundreds of pages of new content for you to reference and help you in your app journey. Oh and search.
If you come across a documentation issue please let us know via the
Send Feedback button at the top of every page.
Added support for collectionGroup() querying
- This new API enables you to query all documents in your database that are contained in a collection, or even sub-collections, with the given collection name (collectionId).
Improved Read/Write performance
- Size of Firestore data being sent over the bridge has been reduced by ~58%.
- Large query results now return substantially quicker, e.g. on a result with 4 documents, each with 1,500 nested array items (each containing an object of all data types) showed a ~50% improvement in speed compared to v5.
- Smaller query results showed a ~15% improvement
You should notice the improvements along with reduced UI jank when querying or setting data. The same improvements were additionally applied to the Realtime Database module.
Added support for put() & putString()
- These new APIs allow you to list files and folders in a storage bucket with pagination support.
- You now now pause, resume & cancel your uploads and downloads.
ML Kit for Firebase
This is a new module now supported in React Native Firebase.
Added support for ML Kit Natural Language APIs
- Identify the language(s) in a string
- Generate Smart Replies for your user's conversations (example video)
Translate APIs to land in a future release.
Added support for ML Kit Vision APIs
Supports both offline (on device) and online (cloud) models.
- Recognize text in an Image using on-device and cloud models
- Recognize document structured text in an image using the cloud model
- Detect faces in an image using the on-device model
- Detect barcodes in an image using the on-device model
- Label/categorize images using on-device and cloud models
- Recognize landmarks in an image using the cloud model
How do I get it?
If you need to upgrade from v5.x.x, we have a migration guide for this.
We've been working on a marketplace called React Native Market where you can purchase official kits and pre-built applications by Invertase to accelerate your next project, we'd love for you to have a look, everything is 50% off to celebrate the v6.0.0 React Native Firebase release. All purchases on the market help sponsor our continued efforts on React Native Firebase.
We'll be adding more products (including free ones!) to it over the next few weeks as well as the ability to customise your builds & pre-integrate your Firebase account credentials.
Where is the Notifications library?
We're almost complete migrating the notifications package, please bear with us. As each module is now its own NPM package we did not want to hold up the rest of the React Native Firebase modules any longer than necessary because of the notifications package, we're hoping to publish the notifications package in the next few weeks, stay tuned!
Finally, we'd like to give a huge thank you to Mike Hardy who has extensively contributed to React Native Firebase this year and almost single-handedly kept the v5 release cycles going - allowing us to focus primarily on v6. Without his help, we'd most definitely be releasing this a lot later. If you'd like to reach out to him on Twitter and show your appreciation for his efforts; please do so.
At Invertase, we're proud to be contributing to open-source and the Firebase community. We hope you'll love this new release of React Native Firebase and we're excited to share with you even more content on the new release over the course of the next few weeks.
With 💛 from the React Native Firebase team at Invertase.
Share this blog post: