Загрузка видео...

Не удалось загрузить видео

На главную

after() in Nextjs

48,270 просмотров • 1 год назад •via X (Twitter)

Комментарии: 9

Фото профиля Alex Sidorenko
Alex Sidorenko1 год назад

Docs

Фото профиля Alfon
Alfon1 год назад

Wait whats the difference between after() and waitUntil() ?

Фото профиля Dominik Ferber
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 Sidorenko
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.

Фото профиля Mubashir
Mubashir1 год назад

amazing, is this api stable?

Фото профиля Alex Sidorenko
Alex Sidorenko1 год назад

Yes, since 15.1

Фото профиля Stephen Rayner
Stephen Rayner1 год назад

Can this be used more than once the same response?

Фото профиля Alex Sidorenko
Alex Sidorenko1 год назад

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

Фото профиля Edgaras
Edgaras1 год назад

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

Похожие видео