NextJs webhook revalidation

I’m stumped trying to get my head around how this workflow should work and get a simple example working and I was hoping for a sanity check. I have a NextJs server side page that has a client side form component and an api POST endpoint that will be used to receive a webhook. When that form is submitted it posts it to a node server for processing. As it sends the post is displays a loading component. The server receives the post request, processes and then sends a webhook response back to next. The next server revalidates the path to the page and if the user reloads the page the data is refetched and it can display it. This all works but I’d like to refetch the component and eliminate having the user reload the page to display the processed data. I think I’m missing a client component hook or something that can be called or triggered by the webhook such that the component knows to refetch? Appreciate any advice!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server