For the complete documentation index, see llms.txt. This page is also available as Markdown.

State actions

Jigx provides three levels of state management that allow you to store, update, and share data dynamically within your app. Each state type serves a different purpose, from app-wide variables to screen(jig)-specific and component-level data, enabling flexible logic and responsive UI behavior.

Types of State

State Type
Scope
Defined In
Accessed Using
Typical Use Case

Global (shared across all jigs)

index.jigx

@ctx.solution.state

Store user roles, preferences, or data shared across multiple screens.

Screen-specific

Inside a jig file (e.g., jig-a.jigx)

@ctx.jig-state

Manage temporary or screen-level logic, such as workflow steps or filters.

Component-specific

Within a component or control

@ctx.component.state @ctx.current.state

Track component interactions, such as toggles, field input, or selected list items.

Best Practices

  • Use Solution State for global variables shared across multiple screens.

  • Use Jig State for logic or UI control within a single screen.

  • Use Component State for localized interactions within a specific component.

  • Always reset state where appropriate (e.g., on logout, refresh, or workflow completion) to ensure consistent behavior.

Last updated

Was this helpful?