Details

Read.


Adding push Notifications with Firebase messaging and Notifee in React Native.

Push notifications in mobile development is a must-go step which any developer who wants to engage his audience needs to implement. In React Native, Notifee is the default solution when implementing rich push notifications in React Native. It has more than 1.3k and is actively maintained. This article will cover how to implement push notifications with Firebase messaging and Notifee In React Native. Throughout hout this article, we will see the following:

  • Configuring Notifee and Firebase messaging
  • Send Firebase notification to React Native app.

Before starting, the prerequisite for this article is having already React Native installed, I have created a default project in which we practise.

Configuring Notifee and Firebase messaging

1. Configuring Notifee

Now that we have gone through the basics, let’s start with actual code. To start, head to your terminal and install Notifee by running the following command.

yarn add @notifee/react-native

Now that Notifee has been installed, we will review some of its basic APIs that display notifications.

notifee.createChannel: This API permits us to create a unique channel and returns a channel Id, which is used by Google services to send notifications an application can have one or more channels. Examples of how to create notifications are as follows.