react-native-firebase vs react-native-fcm

react-native-firebase vs react-native-fcm

In this article, you would not find code examples or detailed features comparison.

Background

A few weeks ago I was working on Expo support drop at my project. The target of the migration was simple – use clear React Native code, without Expo dependencies. We just need to use native code on Android and iOS apps.

One key feature of the application is notification support using cloud infrastructure. We used to use Firebase Cloud Messaging so far. I had to find a library providing FCM integration to React Native. After a short research, I found two candidates:

First choice

Before I chose the FCM library, I looked README files of both libraries. On the top of the react-native-fcm document I saw the note:

react-native-firebase has introduced new firebase messaging and remote/local notification features. We are planning to combine our efforts to reduce duplicated work.

So I stopped reading here and switch to react-native-firebase. The suggested library had nice documentation and brand new version 4.0 was released recently. On the basis of this information, I decided to use the react-native-firebase library.

Revision

After few experiments with working FCM thought react-native-firebase I was disappointed. Only manual pushing messages from Firebase Console was displayed properly on my application.

And I have a dilemma now. I’m not sure what was the cause of my issues. It could be poor FCM skills of myself or insufficient documentation of the library.

Instead of looking for guilty any more, I changed my choice. I tried react-native-fcm regardless of the above-mentioned note. And was the best decision at that time. All of I need works pretty nice.

Conclusion

React Native is a very fast developing environment. After few weeks react-native-fcm README file looks another form. The author has added the migration to react-native-firebase reference project.

What is it change for me? I will prepare for the migration some day. So I must keep in mind to Avoiding Vendor Lock-In ideas.

Post a comment