API Reference / @gtkx/react / index / useParentWindow
Function: useParentWindow()
useParentWindow():
Window|null
Defined in: packages/react/src/hooks/use-parent-window.ts:11
Returns the Gtk.Window of the nearest window ancestor. This is null on the first render even inside a window, because a window provides itself only once its GObject exists, and stays null outside one. The component re-renders when it resolves, so derive from the value rather than reading it once.
Returns
Window | null