MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / handler

Function handler

apps/web/hooks/useMedia.ts:33–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 // Note: By defining getValue outside of useEffect we ensure that it has ...
32 // ... current values of hook args (as this hook callback is created once on mount).
33 const handler = () => setValue(getValue);
34 // Set a listener for each media query with above handler as callback.
35 mediaQueryLists.forEach((mql) => mql.addListener(handler));
36 // Remove listeners on cleanup

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected