Skip to content

fix: deduplicate fallback resize notifications - #8819

Open
nemo-crypto wants to merge 1 commit into
primer:mainfrom
nemo-crypto:fix/resize-observer-fallback-deduplication
Open

nemo-crypto wants to merge 1 commit into
primer:mainfrom
nemo-crypto:fix/resize-observer-fallback-deduplication

Conversation

@nemo-crypto

Copy link
Copy Markdown
Contributor

Closes #8818.

Store the last dimensions in the fallback listener's effect instead of React state. This lets the listener ignore repeated dimensions without adding a rerender.

The Chromium hook test failed against upstream and passed with the patch. It also checks a real dimension change and listener cleanup on unmount. Prettier verification passed.

Prepared with AI assistance.

@nemo-crypto
nemo-crypto requested a review from a team as a code owner November 22, 2026 02:58
@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01c9ce5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch was successfully deployed

1 active deployment
github-pages — 01c9ce55 Deployed Nov 22, 2026 by nemo-crypto via deploy-preview #30812
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.

[Bug]: ResizeObserver fallback repeatedly reports unchanged dimensions

1 participant