Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive style, different behavior between Develop and Production #1106

Closed
alexis-regnaud opened this issue Aug 7, 2020 · 4 comments
Closed

Comments

@alexis-regnaud
Copy link

alexis-regnaud commented Aug 7, 2020

Describe the bug
I have a weird behavior. I use responsive array (Example : <div sx={{ height: ["20px", "50px", "100px"] }} />)
When I am in a development mode all works well, I see the 100px when I am in the large screen. But when I compile in a production mode I see the "20px" in the large screen case. That always happen in the first page loading, when I load for the first time the page, but if I come from another page I see the correct height ("100px").

I have tried to figure out from where provide the problem but I didn't success. The weird thing is some responsive style works (I see the good case), but in the same time any others don't work....

Expected behavior
Seems like at the first app load theme UI responsive not work in a perfect way. I would like success to fix that one :/

Additional context
I use Theme-ui, Gatsby and Nnetlify

@alexis-regnaud
Copy link
Author

alexis-regnaud commented Aug 7, 2020

Not 100% sure but seems like it's related to both useResponsiveValue and useBreakpointIndex function

@alexis-regnaud alexis-regnaud changed the title Responsive style, different behavior between Develope and Production Responsive style, different behavior between Develop and Production Aug 7, 2020
@alexis-regnaud
Copy link
Author

I think its fix by this one : #948
Is the v0.4 stable enough to be used in a production environment ?

@jxnblk
Copy link
Member

jxnblk commented Aug 10, 2020

The RC for v0.4 should be okay for production environments. The biggest potential for breaking changes in that release should only really affect TypeScript users, so be sure to chime in to the TS umbrella issue if you encounter any problems when using the library in TypeScript

@alexis-regnaud
Copy link
Author

Ok thanks for your answer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants