(e: MediaQueryListEvent)
| 28 | |
| 29 | const mediaQuery = window.matchMedia(query) |
| 30 | const handler = (e: MediaQueryListEvent) => setMatches(e.matches) |
| 31 | |
| 32 | // Sync state when query changes - this is intentional since the query prop may change |
| 33 | // eslint-disable-next-line react-hooks/set-state-in-effect |