ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / packages/design-system/hooks/use-mobile.tsx

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / packages/design-system/hooks/use-mobile.tsx
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberpackages/design-system/hooks/use-mobile.tsx
Original SHA-2561b43441b273aa21c1e74fefa774d5a7cb50068e5d4c192a8f63b9c95c5580431
Git blob SHA4331d5c562002281036ddd480a20d854f1880e9b
Reading-copy SHA-2561b43441b273aa21c1e74fefa774d5a7cb50068e5d4c192a8f63b9c95c5580431

Original source ↗

Recovered source transcript

import * as React from 'react' const MOBILE_BREAKPOINT = 768 export function useIsMobile() { const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined) React.useEffect(() => { const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) const onChange = () => { setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) } mql.addEventListener('change', onChange) setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) return () => mql.removeEventListener('change', onChange) }, []) return !!isMobile }

Search equations, builds, manuscript text, and recovered sources.