MCPcopy
hub / github.com/yocontra/react-responsive / Component

Function Component

test/useMediaQuery_test.tsx:29–32  ·  view source on GitHub ↗
(props: ComponentProps)

Source from the content-addressed store, hash-verified

27 it('builds query from props', () => {
28 type ComponentProps = Partial<MediaQueryAllQueryable & { query?: string }>
29 function Component(props: ComponentProps) {
30 const matches = useMediaQuery(props)
31 return matches ? <div className="childComponent" /> : null
32 }
33 class App extends React.Component<ComponentProps> {
34 render = () => <Component {...this.props} />
35 }

Callers

nothing calls this directly

Calls 1

useMediaQueryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…