Page not displaying fresh data from ORM on edit.
Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Cuvier’s Dwarf CaimanOP
Okay, so this is not a nextjs bug. this is something i did wrong in my code.
If anyone could take a look it would be greatly appreciated!
https://github.com/LockScript/lockscript-vault
If anyone could take a look it would be greatly appreciated!
https://github.com/LockScript/lockscript-vault
10 Replies
Cuvier’s Dwarf CaimanOP
Ah okay, so my page.tsx fetches the data from prisma serverside, then passes it through components such as VaultPage, and i just noticed when you DELETE items using the buttons in these client side components it does not revalidate the data until a reload.
It would be greatly appreciated even if someone could just help me structure my application better, or making a PR, anything would help!
Cuvier’s Dwarf CaimanOP
Anyone?
Cuvier’s Dwarf CaimanOP
Please
have you tried experimenting in a small project how you can achieve revalidation?
either via router.refresh(), or revalidateTag() or revalidatePath()
Cuvier’s Dwarf CaimanOP
revalidatePath does not seem to work, and i am trying to do it without refreshes.
Yeah im slow 😂 router.refresh() is fine.
if your app flows from server to client without any logic to refresh the data in the client side, ofc it will need to refresh
unless you trigger client side logic to refresh the data at the runtime, which is something that is outside of Next.js