()
| 26 | useEffect(() => { |
| 27 | const mq = window.matchMedia(query) |
| 28 | const handler = () => setMatches(mq.matches) |
| 29 | setMatches(mq.matches) // re-sync in case the query changed between renders |
| 30 | mq.addEventListener('change', handler) |
| 31 | return () => mq.removeEventListener('change', handler) |
no outgoing calls
no test coverage detected