These two packages will connect Firebase to your React Native Expo App
Expo + Firebase = 🔥🔥🔥
Within this article, you will discover two approaches to seamlessly integrate Firebase into your expo project. If you are not yet familiar with expo, I encourage you to click here for further insights. While both paths offer their merits, it's important to note that they come with their own drawbacks. However, before delving into these paths, let's first explore the compelling reasons why learning Firebase is a valuable pursuit.
Why learn Firebase
It’s ubiquitous
Whether I was working on freelance projects, contract work, or a full time position, I found myself interacting with a Firebase backend. Because of its great adoption amongst businesses, I believe its a safe bet for anyone wanting to dip their toe in the world of backend technologies.
A.I. focused
I believe that the era of A.I. has firmly taken root and is here to stay. Companies and individuals who embrace A.I.-centric technologies will undoubtedly have an advantage over those who don’t. Firebase serves as a prime illustration of forward-thinking companies that have integrated a Machine Learning service into their array of backend technologies. If you aspire to enhance your skill set with A.I.-focused technology, delving into Firebase could prove to be a rewarding endeavor.
A plethora of learning material
When it comes to acquiring new knowledge, the availability of learning resources plays a pivotal role. In my personal experience, Firebase stands out for its wealth of resources catering to diverse learning preferences. Its documentation provides first-class examples and engaging videos for visual learners, while a plethora of YouTube videos and articles cater to your desire for further exploration.
How to connect Firebase to your Expo projects
Firebase JS SDK
If you want to get started with firebase services like cloud Firestore, you can use the Firebase JS SDK in your expo project. This SDK is perfect if you wish to use the expo go app for your React Native project.
Firebase JS SDK caveats
If you're new to the React Native ecosystem, it's important to understand that there are two prevalent approaches for building React Native apps: Expo CLI and React Native CLI. Within the Expo CLI, there are various methods to interact with your React Native app, with one of them being the Expo Go app. Expo Go provides a quick and convenient way to kickstart your development journey while sparing you the complexities associated with custom native code typically encountered in the Expo Bare Workflow or React Native CLI Workflow. However, it's worth noting that opting for Expo Go means foregoing access to essential Firebase features such as Analytics, Dynamic Links, and Crashlytics. These powerful tools require the management of native code, which is not accessible within the Expo Go app.
React Native Firebase
If Firebase tools like Analytics, Dynamic Links, and Crashlytics is a must, than you will need to use the React Native Firebase package in replace of the Firebase JS SDK.
React Native Firebase caveats
If you decide React Native Firebase is best for your needs, than you will carry the burden of managing native android and iOS code. If you’re using the managed expo workflow and you want to use React Native Firebase, you’ll need to create a development build or use the expo run command expo run:[ios|android] for either iOS or Android. If you want detailed instructions on how to use the React Native Firebase package, use the expo docs and the React Native Firebase docs.
Ways to support my newsletter
🖥 If you believe this content is valuable, share it on social media
🎤 If you believe I would be a good fit for a podcast, let your favorite podcaster know
Connect with me
Connect with me on LinkedIn!
Connect with me on Twitter!