Next.js Discord

Discord Forum

What are alternatives to revalidatePath?

Unanswered
Brown-chested Martin posted this in #help-forum
Open in Discord
Brown-chested MartinOP
Hey, I got into situation where I have from adding todos with server actions and then I need to revalidatePath path to refresh page and get fresh data. Is this the only option for server actions? It makes full reload as expected I guess, but I don't like it.

Is my another option to replace server action with api handler and do it like on classic react app? Is it ok to use RSC data as init for react-query -> useQuery and then fully operate using that on client side and talking to API?

0 Replies