thearnica / react-media-match

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

Partial Hydration based SSR media queries #36

Open theKashey opened 4 years ago

theKashey commented 4 years ago

It's possible to render a "predicted" target during SSR, but the guess might be incorrect. In order to "fix" we have to render everything twice:

Proposal

Should be safe due to a top-level matches provider, which can orchestrate everything below it.

Alternatively

thearnica commented 4 years ago

Don't forget about #11 - almost the same (but the opposite). #36 and #11 could play very nicely together.