Next.js Discord

Discord Forum

Is revalidate not supposed to work when data is fetched through a server action within useeffect

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
I tried to get data through a server action inside useeffect, it renders the data but revalidate does not update data on the client when data on the server changes.

But when I fetch data using a parent component (server component) from the ORM on the server and pass it down the child (client component) as a prop, revalidation works when I make changes to the server data.

Is this the expected behavior, Is revalidatepath not supposed to work if I fetch data through a server action inside useeffect?

0 Replies