c219d87a69
* use `ownerDocument` instead of `document` This should ensure that in iframes and new windows the correct document is being used. * update changelog
7 lines
227 B
TypeScript
7 lines
227 B
TypeScript
import { useMemo } from 'react'
|
|
import { getOwnerDocument } from '../utils/owner'
|
|
|
|
export function useOwnerDocument(...args: Parameters<typeof getOwnerDocument>) {
|
|
return useMemo(() => getOwnerDocument(...args), [...args])
|
|
}
|