- WindowListener<TKey>(props): JSX.Element
Type Parameters
- TKey extends keyof WindowEventMap
Parameters
- props: {
capture?: boolean;
on: TKey;
options?: AddEventListenerOptions;
then: ((this, event) => void);
}Optional
capture?: boolean
Optional
options?: AddEventListenerOptions
then: ((this, event) => void)
- (this, event): void
Parameters
- this: Window
- event: WindowEventMap[TKey]
Returns void
Returns JSX.Element
Attach a window listener to the lifecycle of the current Context. The event listener will be removed when the context is destroyed.