Next.js Discord

Discord Forum

Updating UI after webhook receives update problem.

Unanswered
Xantus's Murrelet posted this in #help-forum
Open in Discord
Xantus's MurreletOP
I got a media library with an image list and video list. I fetch both lists with a server action and I also use unstable_cache with a tag to revalidate. The media library is a server component.

The problem I have is when I upload a video to MUX. The UI gets updated with a placeholder processing image. And my webhook is listening to mux to check when the video is ready. But when the video gets updated the placeholder is still there and doesn’t get updated. When I navigate in my dashboard it gets updated so the cache is invalidated but the ui not untill I navigate or refresh.

Should I use SWR or is it possible with server components ?

0 Replies