Update Server Component after data has been changed by Client Component in Next.js
The only way to update a Server Component is to reload the page. As it’s sent to the browser as static HTML without any JavaScript attached to it to have interactivity. To reload the page while keeping client side states, you could use router.refresh(), where router is the returned value by useRouter(). Here is an … Read more