SDK 39 - Notifications without react hook?

Please provide the following:

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all): iOS

On Expo SDK 39 - is it still possible to use Notifications library without react hooks and with a class-based app?

Hey @nicoz, yeah you can use the Notifications module with class-based components as well.


Thanks for the reply! Is there other documentation that shows that? My previous implementation pre SDK-38 doesn’t seem to be working any longer.

Sample code;

import * as Notifications from ‘expo-notifications’;

this._notificationSubscription = Notifications.addNotificationReceivedListener(

_handleNotification = (notification) => {
    console.log("In:_handleNotification notification object:", JSON.stringify(notification));

The console.log in _handleNotification does not get triggered at all.

Thank you!

Well - not sure what happened but It’s firing up now. Sighs. Thanks again

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.