N
Novuβ€’3mo ago
turtles

Data payload undefined in new React <Inbox /> component

Hey I'm trying to update from the old React Notification Center to the new Inbox. If I trigger a notification via the website I get undefined for the data payload. I've even added an explicit "data" field. Im using "@novu/react": "2.2.0" Am I missing something?, I've attached a screenshot showing how the notification comes through using the old style IMessage from the PopoverNotificationCenter
No description
No description
No description
10 Replies
Pawan Jain
Pawan Jainβ€’3mo ago
@turtles Currently, it is supported only in @novu/framework
turtles
turtlesOPβ€’3mo ago
Ahh, I see. Are there plans to increase support so using the website or @novu/node to trigger a notification works for the new React package?
Pawan Jain
Pawan Jainβ€’3mo ago
We are planning to release this end of october or start of november. is that a blocker for you to use Novu?
turtles
turtlesOPβ€’3mo ago
We are using Novu already. I was just trying to update to the new component. Once it's supported on @novu/node we will be able to finish the update πŸ™‚
turtles
turtlesOPβ€’3mo ago
Just as a FYI from a user perspective I followed the Migration guide on your docs and it doesnt sound like its not compatible with any of the packages, maybe it should be in breaking changes? and in this section https://docs.novu.co/inbox/react/styling#variables there is a small typo: "if you want to change the border radius of all the components at once, you can do so by updating the colorPrimary variable". We like Novu and it's saved us a lot of time, so thanks πŸ™‚
Novu
Styling the Inbox component - Novu
Learn how to style the pre built Inbox component
Novu_Bot
Novu_Botβ€’3mo ago
@turtles, you just advanced to level 1!
Pawan Jain
Pawan Jainβ€’3mo ago
@turtles Sorry for delayed response. Would you like to share the use case with data field? I might have workaround for you.
I followed the Migration guide on your docs and it doesnt sound like its not compatible with any of the packages, maybe it should be in breaking changes?
Can you please share more about breaking change?
there is a small typo: if you want to change the border radius of all the components at once, you can do so by updating the colorPrimary variable
Apologies, can you please share the typo. I could not figure out.
turtles
turtlesOPβ€’3mo ago
No worries - Would you like to share the use case with data field? I might have workaround for you. Yeah we send info around in the old payload. We have a side panel that alerts the user if a measurement exceeds a threshold. We use data in that payload to populate that panel or we can popup a toast. Extra little nice to have things that we would otherwise need to add backend routes for - Can you please share more about breaking change? The guide reads like you just need to update the front end components and it should work with existing backend implementations (in our case @novu/node). The guide says compatibility with @novu/framework not that it only works with @novu/framework . Could just be my interpretation though, but it confused me. - *Apologies, can you please share the typo. I could not figure out. * We are being told if we want to change the borderRadius we should change the colorPrimary variable instead of the borderRadius variable
Sang Dang
Sang Dangβ€’2mo ago
Sorry to chime in but currently I face similar issue. After upgrading the data is undefined. I tried to check the docs but it is not in a flow, like I followed the upgrade guide, but it never mentions the framework anywhere. My question is, if I send the trigger from the server, should I upgrade the @novu/node into something else or it is the same? Thanks.
Pawan Jain
Pawan Jainβ€’2mo ago
@Sang Dang Are you using @novu/framework to create workflow and @novu/react for in-app notifications?
Want results from more Discord servers?
Add your server