Use "useLastNotificationResponse" hook in class based app?

SDK 40, Android & iOS

Hey guys!

I recently upgraded the App to SDK 40 from 38 after noticing that notifications didn’t work correctly when the app is killed. The notifications came through and you could click on it. But as the app opens up it basically ignored the notification and stuck to the start page. After reading up about it a little, I came across the new hook “useLastNotificationResponse” which was introduced to remedy this problem if I understood correctly.

The problem is that our App is currently using the class based approach. So I’m having some difficulty actually using the hook because of the “Invalid Hook Call” Error. And we currently don’t have the time to rework the application. Is there a way to get the hook working in a class based approach? Maybe a workaround?

Thanks in advance!

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