After your Server Action inserts or updates data in the database, call revalidatePath('/posts') so Next.js immediately refreshes the cached data on that page—or call redirect('/posts') to send the user there.
ADVERTISEMENT
We use cookies to collect and analyse information on site performance and usage, and to enhance and customise content and advertisements. Learn more
Required for basic website functionality.
Help us understand how visitors interact with the site.
Used to show relevant ads and measure ad performance.