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

Getting rid of hydration errors for nextjs pages in ExpEditor #1161

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

art-alexeyenko
Copy link
Contributor

This adds a workaround for Experience Editor to make it work better with nextjs apps and avoid hydration errors that started occurring after next and react version upgrades.

Description / Motivation

React will add specific markup for empty placeholders in Experience Editor on first page load. This way it won't be "confused" by this markup when Experience Editor client side scripts add it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested a review from a team September 19, 2022 20:28
Copy link
Contributor

@ambrauer ambrauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just curious - do we know if the same solution will be necessary in Horizon/Pages?

@art-alexeyenko
Copy link
Contributor Author

@ambrauer it shouldn't be. Placeholders appear to behave slightly different on Pages and hydration error does not occur when I tested (at least on XM Cloud deployment).

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.

None yet

2 participants