Skip to main content

useWindowRef

SteamClientHomebrewSDK v1.0.0


SteamClientHomebrewSDK / client/src / useWindowRef

Function: useWindowRef()

function useWindowRef<RefElementType, WindowType>(): [Ref<RefElementType>, undefined | null | WindowType];

Defined in: typescript-packages/client/src/utils/react/react.ts:160

React hook to find the host window of a component Pass the returned ref into a React element and window will be its host window.

Type Parameters

RefElementType

RefElementType extends HTMLElement

WindowType

WindowType = Window

Returns

[Ref<RefElementType>, undefined | null | WindowType]

[ref, window]