Hydration mismatch error occurs due to external script tags.
The issue involves a hydration mismatch error when external plugins insert script tags before the head tag, causing UI breaks during hydration. The solution likely requires modifying how React handles hydration in such cases, but the exact fix is unclear and may involve server-side rendering logic.
React version: 18.0.0, 18.1.0-next-fc47cb1b6-20220404 (latest version in codesandbox)
Link to code example: https://codesandbox.io/s/kind-sammet-j56ro?file=/src/App.js
If a script tag is inserted before the head tag due to the user's browser environment such as a plugin, it is judged as a hydration mismatch and the screen is broken.
https://user-images.githubusercontent.com/4126644/164953071-14546c74-d9ab-4a6f-8f99-6712f29c6dd6.mov
This problem may b
Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!