> For the complete documentation index, see [llms.txt](https://docs.jigx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jigx.com/building-apps-with-jigx/logic.md).

# Logic

Building logic in Jigx involves manipulating, managing, and configuring data within Jigx solutions, jigs, and components that dictate how the app behaves and responds to user inputs.

<table data-header-hidden><thead><tr><th width="126.90625"></th><th></th></tr></thead><tbody><tr><td><a href="/building-apps-with-jigx/logic/expressions.md">Expressions</a></td><td>Expressions are written in JSONata and are a powerful tool for shaping, structuring, and manipulating data before binding the data to the UI and actions.</td></tr><tr><td><a href="/building-apps-with-jigx/logic/state.md">State</a></td><td>States manage the data within Jigx solutions, jigs, and components and controls the UI dynamically. The state allows solutions and components to change their output in response to user inputs and actions, ensuring a coherent and consistent user experience.</td></tr><tr><td><a href="/building-apps-with-jigx/logic/navigation.md">Navigation</a></td><td>Navigation allows you to flow through the app. Whenever you <a href="https://docs.jigx.com/examples/readme/actions/go-to">go-to</a> a jig, the jig is added to the history, this allows you to go back and visit the jigs you visited before, and either show the history (data) on the UI or a new (clear) jig.</td></tr><tr><td><a href="/building-apps-with-jigx/logic/validation.md">Validation</a></td><td>Ensure the data users enter into input fields meets specific criteria before the app processes or accepts it. This validation can occur in real-time as the user fills out a form or submits it. Field validation maintains data integrity, provides a better user experience, and prevents errors or issues in the app's functionality.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jigx.com/building-apps-with-jigx/logic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
