Basic Usage

Learn how to import the library & use the library within your project.

Importing the library

Once installed, Notifee can be imported into your React Native project:

import notifee from '@notifee/react-native';

The default export can then be used to interact with Notifee API, either inside of your React components or standalone (e.g. inside of a Headless Task).

The library also exports the API types, documented within the Reference API. For example to import the AndroidColor type:

import { AndroidColor } from '@notifee/react-native';

TypeScript

Projects using TypeScript with React Native can expect Notifee to work out of the box with no additional steps required. Simply import the package and the typed API interface will be available.

Using TypeScript in React Native is entirely optional and is not required to use Notifee.

Android vs iOS

Notifee supports both Android & iOS using the same interface. The API has been designed to function on both platforms, even in situations whereby functionality may not exist on one platform. In those cases, the API will "noop" or instantly resolve.


Copyright 2020 - 2021 © Invertase Limited

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License and code samples are licensed under the Apache 2.0 License.

All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.