You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EUI's startup requires the whole browser environment to be available, including window. If these are available, React switches into a DOM-active mode and will interact with the environment e.g. adding event listeners. This means that every server-side render will pollute the polyfilled environment and would need to be destroyed & re-created between renders.
Does anyone have fix for that ? I would like to use EUI with NextJS. Its heartbreaking since EUI is definitely one of the nicest design systems i came across. Can someone provide hints how to implement it ?
Activity
[-]HTMLEleme[/-][+]HTMLElement is not defined[/+]thompsongl commentedon Apr 15, 2019
My sense is that this is happening during a server-side render. Is that correct?
Next.js uses jsdom (I believe) with SSR, which doesn't have
HTMLElementglobally available viawindow.This is polyfill-able, but SSR is not something we've given a lot of thought to yet. Correct me if I'm wrong, @chandlerprall
chandlerprall commentedon Apr 15, 2019
EUI's startup requires the whole browser environment to be available, including
window. If these are available, React switches into a DOM-active mode and will interact with the environment e.g. adding event listeners. This means that every server-side render will pollute the polyfilled environment and would need to be destroyed & re-created between renders.elvenking commentedon Jun 22, 2019
Does anyone have fix for that ? I would like to use EUI with NextJS. Its heartbreaking since EUI is definitely one of the nicest design systems i came across. Can someone provide hints how to implement it ?
thompsongl commentedon Sep 10, 2019
#2074 is a better catch-all issue and gets at the real problem