Styled componentes with breakpoints

When using Expo for web we need the desktop view. If you are styling with Styled Components the media query functionality does not work for web.

I made a tagged template literal to overcome this limitation and also putting an issue on styled components repo to see if it can be fixed.

I have seen lots of demos of expo web but non with desktop views. If we are embracing web we need to embrace desktop views as well.

Here is a snack with desktop view demo working. open the preview in web in a new window and extend the window beyond 768px to see it in action. Also the snack shows that besides media queries not working also the css prop does no work either. This I found that works using styled-components/primitives (but this module can’t be imported in a snack for some reason)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.