Support for Excluding Tags in useNotifications Hook
Hi team,
We're using the Novu SDK in our React Native app, and I have a question (or possibly a feature request) regarding tag filtering in the useNotifications hook.
As far as I understand, the current tag filtering works as an inclusive filter — i.e., if I provide tags: ['Reservations'], I receive all notifications that include this tag, even if they also contain others like 'Critical'.
Here's our scenario:
We have two different screens:
Screen A: Should show only critical notifications (easy to handle with tags: ['Critical'])
Screen B: Should show everything else except critical, like [Reservations, Announcements, etc.] — but not Critical
The issue is that we can't currently exclude tags, so if a notification has both Reservations and Critical, it still appears in Screen B — which is not desired.
I understand this might require rethinking our tag design, but adding support for exclusive tag filtering (e.g., excludeTags: ['Critical']) would make this much more flexible.
Is there already a way to achieve this that I'm missing? If not, could this be considered as a feature request?
Thanks in advance!
2 Replies
@yurii_kluban
Thanks for sharing the use case. I will share the feedback with our product team
I'm also interested in this. I think that something similar should also be available via @novu/api