GitHub - jamwt/cached-dmv: Demo App show...
i just added the convex cache from here in my app. and damn i love not seeing any reloading effects (other then important data that i do have bars in place for to give user a good experience)
https://github.com/jamwt/cached-dmv/tree/main
just want to ask if there's anything i should know using this custom useQuery in a big application.
i can safely replace all my useQuery to use from cache.
if there's anything i should consider, please let me know
GitHub
GitHub - jamwt/cached-dmv: Demo App showing off ConvexQueryCache
Demo App showing off ConvexQueryCache. Contribute to jamwt/cached-dmv development by creating an account on GitHub.
4 Replies
ok so i've been using it,
i remember in the video "cache is attached to subscriptions"
from what i understand is that usequery caches only when a subscription is active and data is being fetched live.
to create a subscription we need to visit the page and initiate the query right?
problem is that when in development any code changes are made (only that portion of code is updated) (talking about nextjs here)
as nextjs dev mode correctly update portion of code.
so the subscription becomes inactive when using the cached useQuery.
has anyone else faced this? kinda difficult to refresh the whole page for it to work after making any small change.
looking for suggestions!
This might be related to another issue someone was raising with this library and Next.js. FYI @ian
The newest version of
convex-helpers
I released today fixes this issue - give it a shot and let us know if you see any issuesThanks Ian will do
@ian tagging you to really appreciate the work on this man. works like a charm now, couldn't have been a better way to use convex for queries.