Skip to content

Conversation

@utftu
Copy link

@utftu utftu commented Nov 12, 2019

No description provided.

@yocontra
Copy link
Owner

Can you explain the intention of this a little more? For SSR we recommend people use the methods documented in our README.

@utftu
Copy link
Author

utftu commented Nov 12, 2019

In the README solution, we rigidly set the screen resolution (using headers). I propose another solution (like react-media ReactTraining/react-media#96 by advice facebook/react#8017 (comment) and facebook/react#10591 (comment)), render a tree with the same values and asynchronously change the screen resolution to the next. In this case, we get an extra render, but at the same time we give the user the opportunity to rely on the actual screen size.

@yocontra
Copy link
Owner

@utftufutukgyftryidytftuv Did you try using the documented method? If you use it with SSR it only sets it during the server render, then when the user loads the page it uses the actual values - the functionality should end up being the same as this PR, but with a better chance of needing no additional work if the values you guessed are correct. If not we should look into that + adding more tests since that is the intention.

@yocontra
Copy link
Owner

Closing, haven't received a response in 2+ yrs

@yocontra yocontra closed this Mar 24, 2021
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

Successfully merging this pull request may close these issues.

2 participants