/** * Tracks the state of a media query. * * @remarks * This hook uses `window.matchMedia` to listen for changes to the specified media query. * It uses `useSyncExternalStore` to ensure concurrent rendering compatibility. * * @param mediaQuery - The media query string to match (e.g., "(min-width: 768px)"). * @returns `true` if the media query matches, `false` otherwise. * * @example * ```tsx * const isDesktop = useMatchMedia("(min-width: 1024px)"); * return