eui icon indicating copy to clipboard operation
eui copied to clipboard

[Meta] Server side rendering / SSR

Open chandlerprall opened this issue 3 years ago • 8 comments

Issue description updated by @tkajtoch.

Summary

Server Side Rendering (SSR) isn't currently officially supported by EUI despite the effort made in the past to make it so. We know that some internal and external teams already use our components and utilities on the server side, and we want to provide official support for this feature.

We've already made some improvements in the past and fixed reported bugs related to SSR as they came, but we have yet to take the time and effort to confirm EUI is 100% SSR compatible.

Acceptance Criteria

  • All EUI components should be SSR compatible
  • There should be no hydration errors related to unique ID generation, DOM nesting, and others when rendering EUI components
  • A documentation page should be added to guide users on how to use EUI in server-side rendered environments as well as in Next.js
### Tasks
- [ ] https://github.com/elastic/eui/issues/7093
- [ ] https://github.com/elastic/eui/issues/7094
- [ ] https://github.com/elastic/eui/issues/5418
- [ ] https://github.com/elastic/eui/issues/5305
- [ ] https://github.com/elastic/eui/issues/7079
- [ ] https://github.com/elastic/eui/issues/7078

chandlerprall avatar Nov 29 '21 18:11 chandlerprall

@chandlerprall should the following issue also be tracked here? https://github.com/elastic/eui/issues/4807

elizabetdev avatar Nov 30 '21 12:11 elizabetdev

@chandlerprall should the following issue also be tracked here? #4807

Done!

chandlerprall avatar Dec 01 '21 17:12 chandlerprall

It is also erroring when you use EuiAccordion

bradennapier avatar Mar 23 '22 02:03 bradennapier

v62.1.0 SSR has stopped working with the error ReferenceError: window is not defined

irudyi-carecloud avatar Aug 04 '22 12:08 irudyi-carecloud

I see: "We expect this feature to be completed before the end of October 2023." -> Is the planning on track?

acidjunk avatar Oct 10 '23 14:10 acidjunk

Team - is there any update on this? I've tried integrating Elastic UI with SSR but running into a lot of issues with CSS or HTMLElement throughout the library.

jlove-dev avatar Dec 11 '23 16:12 jlove-dev

Hello 👋 . We don't have plans to tackle this any time in the near future.

JasonStoltz avatar Dec 11 '23 16:12 JasonStoltz

Tried digging through this some more and still running up against the lovely ReferenceError: CSS not defined.

I no longer hit the CSS error when running dev, but now only on build.

Running react: ^18, next: 14.0.4, eui: ^91.2.0

mdefazio avatar Feb 22 '24 20:02 mdefazio