Next.js Discord

Discord Forum

revalidatePath behaviour

Unanswered
French Angora posted this in #help-forum
Open in Discord
French AngoraOP
I am developing a dashboard with a home route that fetches and displays data. Additionally, there are other routes, such as the clients route, which fetch data related to their specific endpoints. I want changes made in these routes to be reflected on the home route as well. Currently, I have implemented a server action to revalidate the current route using revalidatePath('/clients'), and it works fine. However, I also need to update the home route when changes occur.

I added another revalidatePath('/') for the home route, but it doesn't seem to work as expected. While it successfully revalidates the current route, the home page does not get updated when navigating back to it. I'm seeking guidance on how to effectively revalidate the home page along with the current route, ensuring that the displayed data is always up-to-date across the entire dashboard

0 Replies