Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/prefer after for analytics #1671

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

olavoparno
Copy link
Contributor

closes #1653

fixes

What changed? Why?

  • leveraging new API called after from Next which functions slightly different than waitUntil

https://nextjs.org/docs/app/api-reference/functions/after

  • key points in favor of after:
  1. A callback function which will be executed after the response (or prerender) is finished.
  2. waitUntil accepts a promise and enqueues a task to be executed during the lifecycle of the request, whereas after accepts a callback that will be executed after the response is finished.
  3. Next recommends it:

We recommend using after as it has been designed to consider other Next.js APIs and contexts.

PlanetScale deploy request

Notes to reviewers

How has it been tested?

  • Locally
  • Vercel Preview Branch
  • Unit test
  • Functional test

Olavo Parno added 24 commits November 28, 2024 13:08
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swc-web ✅ Ready (Inspect) Visit Preview Dec 17, 2024 8:30pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant