Actions
set-state
3min
the set state action sets the global state (also called the solution state) multiple components and {{jig}} 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 docid 0js3trstyj4kcu6vviv1y configuration options configuration options a set state action can be set up in various ways as onfocus action that will be executed as onrefresh action that will be executed as the main action on the {{jig}} , and when you press the action, the set state action will be executed the onpress and onchange actions will be executed when you trigger these events examples and code snippets examples and code snippets set state as onfocus/onrefresh 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 onfocus type action set state options state =@ctx solution state onfocus key value =@ctx solution state on focus key +1 onrefresh jigx onrefresh type action set state options state =@ctx solution state onrefresh key value =@ctx solution state on refresh key +1 set state as action set state action is used as the primary action on the {{jig}} , to set the value of the action key to +1 see the example in github action jigx actions \ children \ type action set state options title add 1 to your action key state =@ctx solution state action key value =@ctx solution state action key +1 set state as 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 onpress type action set state options state =@ctx solution state onpress key value =@ctx solution state on press key +1 onchange jigx onchange type action set state options state =@ctx solution state onchange key value =@ctx solution state on change key +1