Next.js Discord

Discord Forum

Revalidate from Server action for simple in-memory state. SSR = stale data

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
Hi there,

I have a question regarding a certain behaviour for SSR components. Before i get to it, i am not sure exactly in what category does the problem fall under.

- Essentially i have a client side component calling a server action that mutates state from another module (Used for test purpose to test Next.js behaviour).
- I then revalidate the path so that my SSR component re-renders which it does.
- I expect the SSR to then display the latest fresh mutated data.
- It does not, it never displays an updated variable, only the initial one.

I am not using fetch in my server action, i am simply mutating a variable.

I posted the full question and all my code details in the discussions on GitHub, unfortunately the entire post cannot be pasted here so please follow the link below to assist me.

https://github.com/vercel/next.js/discussions/54305

0 Replies