API Reference / @gtkx/components / StatefulAction
Variable: StatefulAction
constStatefulAction:StatefulActionComponent
Defined in: packages/components/src/stateful-action.tsx:32
Renders a Gio.SimpleAction whose state is a plain JavaScript value instead of a GLib.Variant. The state is controlled: a menu item, a button or an activation only requests a new state through onStateChange, and the action changes when state does. A boolean state makes a toggle. Any other state makes a choice that an item selects by passing the value as its target.