# `react-doctor/no-match-media-in-state-initializer`

matchMedia in state initializer

- **Category:** Bugs
- **Severity:** warn
- **Source:** oxlint-plugin-react-doctor
- **Framework:** global
- **Enabled when:** react, ssr

## Validation prompt

Use this to decide whether a fired diagnostic is real or a false positive.

Confirm the reported code matches matchMedia in state initializer. Check the framework context and diagnostic message before suppressing it.

## Fix prompt

Use this once validation confirms the diagnostic is real.

Prefer CSS media queries for layout, or subscribe with `useSyncExternalStore` and provide a stable server snapshot.
