N
Novu3mo 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.
9 Replies
Pawan Jain
Pawan Jain3mo ago
@son Currently payload is not sent with notifications. We are working on it and it will be available in few weeks
son
sonOP3mo ago
but it is avilable in older version
Pawan Jain
Pawan Jain3mo ago
Yes, in older version, payload was sent in notification response. New inbox component and associated apis currently does not return this info
son
sonOP3mo 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 Jain3mo 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 Jain4w 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
Pawan Jain
Pawan Jain2w ago
@son Did you get chance to look into this? Happy to hear your feedback @son Closing this post due to inactivity. Feel free to create a new one if you still have any questions

Did you find this page helpful?