# 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="logic/expressions">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="logic/state">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="logic/navigation">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="logic/validation">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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
