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

[Grid] Incorrectly SSRed #98

Open
mwskwong opened this issue May 6, 2022 · 0 comments
Open

[Grid] Incorrectly SSRed #98

mwskwong opened this issue May 6, 2022 · 0 comments

Comments

@mwskwong
Copy link

mwskwong commented May 6, 2022

Note this only happens if the grid container contains multiple grid items of different sizes.

i.e. The plugin correctly SSR this:

<Grid container>
  <Grid item xs={6}/>
  <Grid item xs={6}/>
</Grid>

But not this

<Grid container>
  <Grid item xs={8}/>
  <Grid item xs={4}/>
</Grid>

The issue I found in the style of the grid container is somehow missing in the 2nd case, and hydration will not add the style back. The only way for it to be correctly rendered is to reload the page.

Workaround
Hard coding the styles in the style prop

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

1 participant