Auchen
Auchen
TTCTheo's Typesafe Cult
Created by Auchen on 12/13/2023 in #questions
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!
1 replies
TTCTheo's Typesafe Cult
Created by Auchen on 1/16/2023 in #questions
Resources to use work training budget
Hi all, I get a yearly budget to use for training and I’m not sure what to spend it on. Does anyone have any recommended resources or courses that are paid for? Happy to hear about anything; I’m a mid level front end engineer looking to go more full stack so something back end focused would be cool. If i can’t find anything I’ll probably buy a copy of Refactoring UI.
11 replies