Comments (3)
Yep @StefanoPastore, if you need server-side rendering I'd say your solution works pretty well. I think all you'd need from us in that case is a <Media defaultMatches>
prop that you could set true
/false
depending on which element you want to show by default.
Would you like to make a PR?
from react-media.
@mjackson of course.
I made it, I met two problems: to test the feature I implemented throw
on console.error
and I had to implement static method isClient
and override it while testing.
Please see the commit messages for the change log.
Thanks.
from react-media.
See #15
from react-media.
Related Issues (20)
- Deploy process broken due to npm auth issue
- Make query and queries both valid ways to reference the props HOT 2
- Problem with SSR + query HOT 3
- Add .editorconfig file
- React-media seems to nest the component within itself
- Which browsers are supported? HOT 2
- How to forward refs/make <Media> more transparent? HOT 8
- Update TS definitions for v1.10 HOT 1
- DropdownList hover should change rw-state-focus element HOT 3
- React v16.9 support HOT 6
- support typescript? HOT 2
- Media tries to update unmounted component HOT 22
- Is height supported? HOT 1
- Add hooks to API HOT 1
- Improve docs and tests for useMedia hook HOT 8
- Two-pass rendering is broken in the hooks implementation HOT 10
- query and queries prop HOT 1
- kotlin wrapper
- Babel Runtime dependency
- React-media
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-media.