Notifications provided by useNotifications() Hook is undefined
notifications provided by useNotifications() Hook is undefined but when i click on bell icon(<NotificationBell />) it is defined so i suppose it is being lazily loaded for the reference i have attached two images first one is before clicking bell icon and one is after . I want to access notifications is there any other way to do so?
34 Replies
@NIKHILHARISINGHANI
Can you please share the code snippet
I am just printing the notifications
@NIKHILHARISINGHANI
Please share the complete code snippet how you are using this hook
<Fourth /> component has
useNotifications
hook
I see you are using <PoppverNotificationCenter />
componentNo i just wanted to print notifications
@NIKHILHARISINGHANI, you just advanced to level 1!
I have found a way to render notifications how do i update my state in real time
Is there any event emitted to which i can listern to?
you can use sockets for that
https://docs.novu.co/inbox/react/get-started#realtime-sockets
Can we increase number of notifications while using useNotification?
@NIKHILHARISINGHANI
I would recommend you to use useFetchNotifications() instead
https://docs.novu.co/inbox/react/api-reference#usefetchnotifications
It has limit option
Also can i use it in cloudflare workers?
If i expose /api/novu in cf worker would that work
Can you get back on thi ASAP
Also can i use it in cloudflare workers?Are you looking to use react notification center in cloudflare workers?
no
I wanted to use backend sdk with cf worker
Seems like i cant do it
i keep getting this error idk y
Hey can you please help me asap??
I was working fine earlier
And now this error
@NIKHILHARISINGHANI, you just advanced to level 2!
@NIKHILHARISINGHANI
Checking with team on this
@NIKHILHARISINGHANI
I tried to make POST http request to https://novutest.onrender.com/api/novu. I am getting the same error
Can you please check if novu secret key (api key) is correctly set?
and this endpoint is public?
Yes checked both
Idk after almost an hour it started working
It could be env variable issue
I wanted to use backend sdk with cf workerCurrently we don't support CF worker. Sharing this with team to add it into our roadmap Is this a blocker for you to use Novu V2? or you are just testing it on CG worker?
I was tetsing it on Node
Environment
Also was trying on local studio
I was getting 400 and 500 error
Dk why
Was working fine earlier
@NIKHILHARISINGHANI
Just want to check if it is working as expected now?
It is working
Bro idk i am getting 400 error in local studio workflow testing
Any solution
It was working fine earlier
Even after succesful sync i dont see changes in dashboard
I have implemented everything correctly
Please getback asap
@Pawan Jain
curl -X POST 'https://api.novu.co/v1/events/trigger' \
-H 'Authorization: ApiKey NOVU_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "push-notification-workflow",
"to": {
"subscriberId": "66a25b5bf502999ed8c9b36b",
"email": "[email protected]"
},
"payload": {
"body": " nn",
"title": "n",
"__source": "studio-test-workflow"
}
}'
@NIKHILHARISINGHANI, you just advanced to level 3!
Please check api key is used correctly
Also in local studio i keep getting 400
stuck here for 2mins and then i get 500
Please check whats wrong
Do you see error description in console or network tab?
Can you share the steps to reprodcu this?
i am trying in new environment
But when i inspected
It said to field is undefined or null
Also geeting error after deploying it says signature mismatch
the url is perfectly fine
Idk why this is not working
Hey