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 Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
Out extends MessageMap | - |
In extends MessageMap | - |
R | unknown |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
factory | () => OpenedWindow<Out, In, R> |
Returns
Section titled “Returns”UseOpenedWindow<Out, In, R>