正在加载视频...
视频加载失败
after() in Nextjs
48,270 次观看 • 1 年前 •via X (Twitter)
9 条评论

Alex Sidorenko1 年前
Docs

Alfon1 年前
Wait whats the difference between after() and waitUntil() ?

Dominik Ferber1 年前
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 年前
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 年前
amazing, is this api stable?

Alex Sidorenko1 年前
Yes, since 15.1

Stephen Rayner1 年前
Can this be used more than once the same response?

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

Edgaras1 年前
This could actually be nice for SOME background job use cases.



