Actions

set-state

3min

The set-state action sets the global state (also called the solution state). Multiple components and s can access the state's value across the solution. Effectively managing the global state ensures that all parts of the app that depend on this data are updated consistently. To understand how to use states, see State.

Configuration options

A set-state action can be set up in various ways:

  1. As onFocus action that will be executed.
  2. As onRefresh action that will be executed.
  3. As the main action on the , and when you press the action, the set-state action will be executed.
  4. The onPress and onChange actions will be executed when you trigger these events.

Examples and code snippets 

Count triggers with set-sate
Count triggers with set-sate


Set state action is used when the onFocus/onRefresh event is triggered and a count is shown of the number of triggers.

See the example in GitHub.

onFocus.jigx
onRefresh.jigx

Set-state action
Set-state action


Set-state action is used as the primary action on the , to set the value of the action-key to +1.

See the example in GitHub.

action.jigx

Set-state onPress/onChange
Set-state onPress/onChange


Set-state action used on the list as onPress/onChange action, to set the value of the key to +1.

See the example in GitHub.

onPress.jigx
onChange.jigx




Updated 01 Oct 2024
Doc contributor
Did this page help you?