Next.js Discord

Discord Forum

Page not displaying fresh data from ORM on edit.

Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Open in Discord
Avatar
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

10 Replies

Avatar
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!
Avatar
Cuvier’s Dwarf CaimanOP
Anyone?
Avatar
Cuvier’s Dwarf CaimanOP
Please
Avatar
have you tried experimenting in a small project how you can achieve revalidation?
either via router.refresh(), or revalidateTag() or revalidatePath()
Avatar
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.
Avatar
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