MCPcopy Create free account
hub / github.com/dailydotdev/apps / onChange

Function onChange

packages/shared/src/hooks/usePrefersReducedMotion.ts:12–12  ·  view source on GitHub ↗
(event: MediaQueryListEvent)

Source from the content-addressed store, hash-verified

10 const query = window.matchMedia('(prefers-reduced-motion: reduce)');
11 setReduced(query.matches);
12 const onChange = (event: MediaQueryListEvent) => setReduced(event.matches);
13
14 if (typeof query.addEventListener === 'function') {
15 query.addEventListener('change', onChange);

Callers 1

onFileChangeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected