Closed guidari closed 3 months ago
Related: #15531
Any updates on this? a similar issue was reported to the @carbon/ibm-products team and was fixed here https://github.com/carbon-design-system/ibm-products/issues/4966 if this could be of any help .
Package
@carbon/react
Browser
No response
Package version
v1.55.0
React version
18.02
Description
Reported on Slack
When using NextJS with
Menu
andOverflowMenu
with server-side rendering the following error shows up: Internal error: ReferenceError: document is not definedThis might be solved by using this helper:
https://github.com/carbon-design-system/carbon/blob/71c553cb9d162d3bfc32885f5d0234d048322b3c/packages/react/src/internal/useEvent.js#L68-L94
Reproduction/example
https://stackblitz.com/edit/stackblitz-starters-vavqe5?file=app%2Fpage.tsx
Steps to reproduce
Open Stackblitz example and check the console log
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct