Rxova
Skip to content

useOpenedWindow

function useOpenedWindow<Out, In, R>(factory): UseOpenedWindow<Out, In, R>;

Drive an openWindow() flow from a component: the factory is called on open(), and the child window’s lifecycle is folded into render state. Reopening replaces the previous window; a stale window’s outcome is ignored.

The child window deliberately outlives an unmount: closing a payment page because a route changed would lose the user’s in-flight transaction. Call close() if the component owns the window’s lifetime.

Type ParameterDefault type
Out extends MessageMap-
In extends MessageMap-
Runknown
ParameterType
factory() => OpenedWindow<Out, In, R>

UseOpenedWindow<Out, In, R>