Convex Auth - re-rendering / caching issue in NextJS
Hey all, I'm seeking some advice for how I can resolve an issue I'm experiencing. On page navigation the components that consume my
use-user
hook tend to flash with a loading state and I would like to avoid this. Any help would be much appreciated. I initially tried this without using the react-query wrapper, but the problem persists in both cases.
Related packages I'm using:
use-user.ts
convex/users.ts
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Seems to work fine now when using NextJS
Link
component for page navigationI only work in one NextJS project that's pretty old, and only very seldom, but I believe
Link
is the "proper" way to navigate within the app. Only use <a>
if you need to link to some page/resource outside of the app.yeah I was using a Breadcrumb component from shadcn that was using the
<a>
under the hood, it wasn't immediately obvious.