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

Fix astro-static-slot hydration mismatch error #7196

Merged
merged 1 commit into from
May 26, 2023
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented May 24, 2023

Changes

While investigating how islands work, I found the hydration mismatch errors in nested-in-react and nested-in-vue fixtures. That's because in SSR we use the astro-slot tag, while in the client we use the astro-static-slot tag.

The client isn't right, and it should always use the astro-slot tag, so this PR fixes it.

Testing

Added test for react and vue. I fixed for Preact too although it doesn't surface any errors, so I didn't made tests for it.

I updated Preact still to be consistent with the other implementation.

Docs

n/a. bug fix.

@bluwy bluwy requested a review from matthewp May 24, 2023 13:57
@changeset-bot
Copy link

changeset-bot bot commented May 24, 2023

🦋 Changeset detected

Latest commit: 434b293

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) labels May 24, 2023
@bluwy bluwy merged commit 1c77779 into main May 26, 2023
@bluwy bluwy deleted the fix-hydration-mismatch branch May 26, 2023 14:37
@astrobot-houston astrobot-houston mentioned this pull request May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants