Closed mattiaz9 closed 1 year ago
Hi @mattiaz9,
Indeed they should, however the portal implementation should be left up to users. While React/CRA could just use ReactDOM.createPortal()
, Next.js might render server side where the document
and window
object do not exist and would require a typeof window !== 'undefined'
check.
Popups such as modals and dropdowns should use portals for the content to avoid problems with overflow: hidden or z-indexes.