Skip to content

Refactor useMediaQuery hook for improved media query handling#1825

Closed
michaltarasiuk wants to merge 1 commit intodubinc:mainfrom
michaltarasiuk:refactor-use-media-query-hook
Closed

Refactor useMediaQuery hook for improved media query handling#1825
michaltarasiuk wants to merge 1 commit intodubinc:mainfrom
michaltarasiuk:refactor-use-media-query-hook

Conversation

@michaltarasiuk
Copy link
Contributor

I rewrote useMediaQuery to utilize useSyncExternalStore, which helps prevent UI inconsistencies that can occur when external state (such as media queries) changes during rendering. By synchronizing the state with the media query listener, it ensures that the UI reflects the most current state without displaying stale information.

@vercel
Copy link
Contributor

vercel bot commented Dec 22, 2024

@michaltarasiuk is attempting to deploy a commit to the Dub Team on Vercel.

A member of the Team first needs to authorize it.

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