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

fix(nextjs): Do not start a navigation if from url is the same #3814

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

AbhiPrasad
Copy link
Member

Right now in certain cases (like with SSR), the router change state
triggers twice for a single pageload. This means that a pageload will
end early and start a transaction with the same name.

See logic: https://github.com/vercel/next.js/blob/e89b8e466aad110f8af3f60ef7d8292f6064a245/packages/next/client/index.tsx#L204

This patch adds a check to make sure that navigation transactions are
only created if the route URL is different.

Fixes #3803

Right now in certain cases (like with SSR), the router change state
triggers twice for a single pageload. This means that a pageload will
end early and start a transaction with the same name.

See logic: https://github.com/vercel/next.js/blob/e89b8e466aad110f8af3f60ef7d8292f6064a245/packages/next/client/index.tsx#L204

This patch adds a check to make sure that navigation transactions are
only created if the route URL is different.
@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 21.46 KB (+0.01% 🔺)
@sentry/browser - Webpack 22.47 KB (0%)
@sentry/react - Webpack 22.5 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.96 KB (+0.01% 🔺)

@AbhiPrasad AbhiPrasad merged commit 4bec90f into master Jul 16, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-nextjs-client-routing-fix branch July 16, 2021 19:06
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.

[@sentry.nextjs] webvitals like LCP and FID are missing due to pageload transaction finishes early
3 participants