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: dont recreate mediaQuery matchers on every render #968

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

Chaoste
Copy link
Contributor

@Chaoste Chaoste commented Jan 31, 2025

When switching with dev tools between desktop and mobile emulator, the breakpoint-specific values would not update correctly.

I noticed that we recreate the event listeners for this on every single render cycle. This led to some changes being not handled correctly as the event listener was not ready yet.

We fix this now with a editor-similar approach

@Chaoste Chaoste requested review from a team as code owners January 31, 2025 16:23
Copy link

vercel bot commented Jan 31, 2025

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

Name Status Preview Updated (UTC)
nextjs-marketing-demo-bug-test 🔄 Building (Inspect) Visit Preview Jan 31, 2025 4:23pm
3 Skipped Deployments
Name Status Preview Updated (UTC)
experience-builder-test-app ⬜️ Ignored (Inspect) Jan 31, 2025 4:23pm
studio-nextjs-marketing-demo ⬜️ Ignored (Inspect) Jan 31, 2025 4:23pm
studio-react-vite-template ⬜️ Ignored (Inspect) Jan 31, 2025 4:23pm

@Spring3 Spring3 merged commit 5c29618 into development Jan 31, 2025
17 checks passed
@Spring3 Spring3 deleted the fix/SPA-render-breakpoints-preview branch January 31, 2025 17:11
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.

2 participants