Loading video...
Video Failed to Load
after() in Nextjs
48,270 views • 1 year ago •via X (Twitter)
9 Comments

Alex Sidorenko1 year ago
Docs

Alfon1 year ago
Wait whats the difference between after() and waitUntil() ?

Dominik Ferber1 year ago
Your clips are so good! Small heads up around this example: Next.js might prefetch pages so you would end up logging views for pages the user never actually visited

Alex Sidorenko1 year ago
Good call, thanks. In a real-world scenario, you'll likely have a loading.tsx or Suspense, and Links only prefetch the page up to the Suspense boundary.

Mubashir1 year ago
amazing, is this api stable?

Alex Sidorenko1 year ago
Yes, since 15.1

Stephen Rayner1 year ago
Can this be used more than once the same response?

Alex Sidorenko1 year ago
Just checked this by adding a ChildComponent that also logs to another hook using after(). Both work.

Edgaras1 year ago
This could actually be nice for SOME background job use cases.
Related Videos
Landing page design + animation + nextjs development. $15,000 flat.
Marcel
17,243 views • 5 months ago



