N
Novu2mo ago
son

Geting payload in notification object

I am using react hook but i dont get template name and also payload in notification object import { useNotifications } from '@novu/react/hooks'; can yuo tell me how to get payload. Currently I am trying to develop cusom inbox and need payload data to show content of notification. The body give string value not actual payload.
8 Replies
Pawan Jain
Pawan Jain2mo ago
@son Currently payload is not sent with notifications. We are working on it and it will be available in few weeks
son
sonOP2mo ago
but it is avilable in older version
Pawan Jain
Pawan Jain2mo ago
Yes, in older version, payload was sent in notification response. New inbox component and associated apis currently does not return this info
son
sonOP2mo ago
ok just checking older version is stable right I m using it to create custome inbox I hope it wont cause any issue
Pawan Jain
Pawan Jain2mo ago
You can use older version if you are blocked due to this. Older version will not get new updates and will deprecate in few months. We will publish migration guide to new inbox component
son
sonOP2mo ago
hi have you removed old document's for novu like 1.x it was showing couple of days back not not now.
Pawan Jain
Pawan Jain2w ago
@son we added support of sending data information in notification, use latest @novu/react and @novu/js version 3.0.3 https://docs.novu.co/platform/inbox/react/components/inbox#data-object
| Novu Documentation
Learn how to use and customize the Inbox component in your React application

Did you find this page helpful?