Anton Kosykh
1 min readApr 24, 2018

--

Hey Roman!

On my current project, I don’t see the situations when @media query is needed.

Excepting maybe basic page font-size or smth else…

The problem is that I always create components that are as stupid as possible. It creates possibility to re-use any component on the any place. This “any” doesn’t match with @media queries due to its ideology.

@media depends on screen, stupid component should depend only on its props. It’s like pure functions — just get rid of side-effects.

--

--

Anton Kosykh
Anton Kosykh

Written by Anton Kosykh

— Stricty pants nerd that sounds like total dork (according to one of the readers) — Also YOLO JavaScript Engineer

No responses yet