useCache not working
How do we cache the response from
useNotifications
? Because its pretty expensive and sometime notification take 10s to be fetch so how to cache it ? Ive added :
But isnt working at all, each time my useNotifications is call (in a screen), the notifications are refetched...
What do I miss ?5 Replies
@loup
Could you please share react native and
@novu/react-native
npm package versionIm using 3.9.3 version
@loup
I just tested, it is instant for me. Definitely not taking 10 seconds to load
Its actually depend, some time is quick (around 200ms, and some time around 4sec, maybe more in worst case
But
useCache
isnt supposed to dont remake query ? and use cache ? Should be great to use it in react query instead
In react native I also have some polyfill error no :
Im gonna try using useNovu
instead of useNotifiations
and manage manually the cache and the request with react query