segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Portal breaks the nextjs hydration. #1512

Closed oxala closed 2 years ago

oxala commented 2 years ago

Hey,

Recently found your library and was using in one of the projects. Good stuff and thank you for your work!

But is seems like there is an issue with the portal hoc you that you have. For example, having an <Overlay isShown={true}>Test</Overlay> anywhere on the page will result in a failed hydration.

image

I've put a tiny project to reproduce the issue here: https://github.com/oxala/next-evergreen-ssr-issue

brandongregoryscott commented 2 years ago

This should be resolved in https://github.com/segmentio/evergreen/releases/tag/v6.10.4