Don't render unnecessary <Portal> instances (#6217)

This commit is contained in:
dan
2024-11-10 23:03:55 +00:00
committed by GitHub
parent 9a10af7117
commit 9247407c70
3 changed files with 48 additions and 59 deletions
@@ -4,7 +4,7 @@ import {createPortalGroup_INTERNAL} from './lib/Portal'
type PortalContext = React.ElementType<{children: React.ReactNode}>
const Context = React.createContext({} as PortalContext)
export const Context = React.createContext({} as PortalContext)
export const useBottomSheetPortal_INTERNAL = () => React.useContext(Context)