Dushyant
Dushyant
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
we are getting issues when we use only useNotifications too, that's why we tried using another hooks as well
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
I need markNotificationAsSeen() fn too, does useSocket provides this function as well then I can avoid using multiple hooks
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
ok
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
yes , same issue happens when we use react package also
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
which react package yoyu are talking about?
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
yes
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
when we refresh the page then we get
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
generally we observe this happens if there are multiple notification in small time frame
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
yes , sometimes we don't receive messages, but we can see them in activity feed , but we don't get all messages using hooks on frontend
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
we get different transactionids for different messages below is sample event data we r getting from const { data } = useFetchNotifications({ query: { limit: 100 , seen : false}, });
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
Hi @Pawan Jain Link for Sandbox : https://codesandbox.io/s/shy-fire-znsnzl
74 replies
NNovu
Created by Ketul on 9/27/2023 in #💬│support
notification feed more than 10
Hey @Pawan Jain , I used real-time socket as you mentioned above in react code. But sometimes I am not receiveing all notifications. some notifications are getting dropped. We are getting all notifications in activity feed but not in socket event in frontend Code snippet is given below for handling new notifications. Pls check const { socket: novuSocket } = useSocket(); const { markNotificationAsSeen } = useNotifications(); const init = (notification) => { // some logic markNotificationAsSeen(notification?.id) } const handleNewNotification = async (notificationData) => { await refetch(); console.log(notificationData,"notification-data"); init(notificationData?.message)
} 

 useEffect(() => { if (novuSocket) { novuSocket.on("notification_received", (data) => { console.log(data,"socket-data"); handleNewNotification(data) }); } return () => { if (novuSocket) { novuSocket.off("notification_received"); } } }, [novuSocket])
74 replies