Загрузка видео...
Не удалось загрузить видео
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.



