-
Notifications
You must be signed in to change notification settings - Fork 281
Description
Is your feature request related to a problem? Please describe.
It would be awesome if the UI5 Web Components could support Server Side Rendering with popular frameworks like Next.js. We have received a similar issue in the UI5 Web Components for React wrapper.
Describe the solution you'd like
I would like the use the UI5 Web Components in e.g. Next.js without the need of applying workarounds. Therefore, some APIs around document would need an abstraction to make sure they are not crashing during SSR and will be hydrated on the client.
Describe alternatives you've considered
It would be possible to use the UI5 Web Components already in Next.js when you are watching out very carefully where you are importing the components. Importing the ui5-button e.g. in a useEffect will enable you to render the button. But if you are now importing an Icon, it will crash because the icon import is accessing the SharedElementRegistry which is accessing document which is not defined during SSR.
Additional context
I played a bit around in the wrapper library in the feat/support-ssr branch.
Metadata
Metadata
Assignees
Type
Projects
Status