I started thinking about conditionally rendering components in my react app. I came across react-media (https://github.com/ReactTraining/react-media) and react-responsive (https://github.com/contra/react-responsive).
Both seem to be very similar and neither mentions differences to the other or use cases where one is particularly bad and the other is better.
Does anybody know of key differences?
generally they all offer same functionality but they have different maintainers and implementations reactTraining maintains react-media while contra maintains react-responsive its like two competing sides with same product where you get to choose which to use some off the minor differences have noted are.
maxWidth={1224}
to construct media queries while react-media does not query={{ maxWidth: 1224 }}
query={{ maxWidth: 599 }}
while react-responsive does notat the bottom line they all seem up to good for media queries inside of react it just a matter of choice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With