()
| 132 | } |
| 133 | |
| 134 | componentDidMount() { |
| 135 | this.initialize(); |
| 136 | // If props.defaultMatches has been set, ensure we trigger a two-pass render. |
| 137 | // This is useful for SSR with mismatching defaultMatches vs actual matches from window.matchMedia |
| 138 | // Details: https://github.com/ReactTraining/react-media/issues/81 |
| 139 | if (this.props.defaultMatches !== undefined) { |
| 140 | this.updateMatches(); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | onChange() { |
| 145 | const { onChange } = this.props; |
nothing calls this directly
no test coverage detected