Headless using Novu/JS
I am using the following snippet on our react js app
const novu = useMemo(() => {
return new Novu({
applicationIdentifier: applicationId,
subscriberId: memberId,
});
}, [applicationId, memberId]);
novu.on('notifications.notification_received', data => {
console.log('new notification =>', data);
getNotifications(1);
});
I see websockets being called in the inspector but the event does NOT get fired. Am I missing anything?
const novu = useMemo(() => {
return new Novu({
applicationIdentifier: applicationId,
subscriberId: memberId,
});
}, [applicationId, memberId]);
novu.on('notifications.notification_received', data => {
console.log('new notification =>', data);
getNotifications(1);
});
I see websockets being called in the inspector but the event does NOT get fired. Am I missing anything?