Enable navigation from notifications
The Inbox component uses therouterPush prop to make your notifications navigable. When you define a redirect.url in your workflow definitions, Novu automatically passes this URL to the routerPush function you provide.
- Tab Title
- Tab Title
- Tab Title
- Tab Title
routerPush behavior based on your routing library
Event Handling
Beyond navigation, you can handle various notification events to create custom behaviors like opening modals, triggering actions, or updating application state.Handle notification click events
You can intercept a notification click event and define a custom behavior using theonNotificationClick prop. This is particularly useful when you want to open modals, drawers, or perform custom actions instead of navigating to a page.
Handle action button clicks
Some notifications include primary and secondary action buttons. You can handle these clicks using theonPrimaryActionClick and onSecondaryActionClick props. These handlers give you access to the notification object and allow you to implement custom logic for each action type.