Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi all,
We have a A/B test middleware called Sitespect, which sits between the user & the deployment. This middleware injects some client-side scripts into the body of the HTML response, which initially caused some hydration errors. We tried to fix these hydration errors by injecting these scripts in a dedicated container with suppressHydrationWarning applied. The initial HTML response seems to have these scripts injected at the correct spot (in the container), but hydration seems to clear this container, thus removing these injected scripts from the DOM entirely & still throwing a hydration warning.
Initial HTML response:

DOM:

Container as code:

Anyone know how to keep these injected scripts in the container?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions