We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
6e47ae7
useQuery
Only
matchMedia
query
useOnly
useOnly = (on?: string, media?: string, strict?: boolean) => boolean | undefined
useOnly = (on?: string, strict?: boolean) => boolean | undefined
on
media
or
const isVisible = useOnly(on, media, strict);
const a = useOnly(on, strict); const b = useQuery(media); const isVisible = a || b;