thearnica / react-media-match

React made responsible - media queries backed by state machinery
MIT License
130 stars 6 forks source link

fix: fix predicted ssr value overwrite window.matchMedia value #47

Closed randy-ang closed 3 years ago

randy-ang commented 4 years ago

fixes issue #46

codecov-commenter commented 4 years ago

Codecov Report

Merging #47 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   82.74%   82.74%           
=======================================
  Files           7        7           
  Lines         197      197           
  Branches       27       27           
=======================================
  Hits          163      163           
  Misses         30       30           
  Partials        4        4           
Impacted Files Coverage Δ
src/createMediaMatcher.tsx 81.81% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d3136bf...8242ccc. Read the comment docs.

thearnica commented 3 years ago

Even with #46 in mind (and please use ServerRender component where possible) this is still correct fix.