@wojtekmaj/react-hooks
Version:
A collection of React Hooks.
8 lines (7 loc) • 301 B
TypeScript
/**
* Returns a flag which determines if the document matches the given media query string.
*
* @param {string} query Media query string
* @returns {boolean | null} Whether the document matches the given media query string
*/
export default function useMatchMedia(query: string): boolean | null;