Skip to main content

Function: quit()

quit(): void

Defined in: render.tsx:194

Gracefully shuts down the GTK application.

Unmounts the React component tree and stops the GTK main loop. Typically used as the onClose handler for the application window.

Returns

void

Example

import { quit } from "@gtkx/react";

const App = () => (
<GtkApplicationWindow title="My App" onClose={quit}>
<GtkButton label="Quit" onClicked={quit} />
</GtkApplicationWindow>
);

See

render for starting the application