#Data payload undefined in new React <Inbox /> component

1 messages · Page 1 of 1 (latest)

karmic mango
#

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

carmine knot
#

@karmic mango

Currently, it is supported only in @novu/framework

karmic mango
#

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?

carmine knot
#

We are planning to release this end of october or start of november.
is that a blocker for you to use Novu?

karmic mango
#

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 🙂

#

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

Learn how to style the pre built Inbox component

scarlet echoBOT
#

@karmic mango, you just advanced to level 1!

carmine knot
#

@karmic mango

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.

karmic mango
#

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

inner flicker
#

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.