Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NV-271] - Tracking - React widget component #524

Closed
scopsy opened this issue May 2, 2022 · 0 comments
Closed

[NV-271] - Tracking - React widget component #524

scopsy opened this issue May 2, 2022 · 0 comments

Comments

@scopsy
Copy link
Contributor

scopsy commented May 2, 2022

Why?

Currently, when people want to embed the notification center within their app they use the embedding script provided in the application settings screen. This code snippet is similar to google analytics creates an iframe window through which the notification center is displayed thru. On one hand, it's universal but creates weird implementation details when embedding with modern front-end frameworks like react.

What?

Exporting our current widget directly using a react component that the end-user can download from npm, integrate his application id and customize some of the components we provide.

Component API

<NovuProvider appId={'123456'} backend={'https://api.novu.co/v1'} userId={1234}>
  <NotificationCenter item={CustomNotificationItem} header={CustomHeader} footer={CustomFooter} onNotificationClick={}>
    {(props) => <NotificationBell {...props} />}
  </NotificationCenter>
</NovuProvider>

Additional Hooks:

  • useNotifications();
  • useUnseenCounter()
@scopsy scopsy closed this as completed May 2, 2022
@novubot novubot changed the title [NV-271] - React Notification Center Component [NV-271] - Tracking - React widget component May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🎉 Done
Development

No branches or pull requests

1 participant