> For the complete documentation index, see [llms.txt](https://docs.trysavvy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trysavvy.com/other-useful-docs/work-in-progress/pending/work-in-progress-how-to-show-loading...-while-fetching-or-processing-data.md).

# Work in Progress: How to show “loading…” while fetching or processing data

\<aside> 💡 NOTE: This is currently only possible in the **Advanced Builder**

\</aside>

Let’s use a Loading situation as an example for this common question!

One idea is to use flags ⛳ with JavaScript in order to display or hide our Loading animation

Let’s pretend we already have our Lottie component in the place that we need on our flow.

What do we need to achieve?

* Show the Loading animation while fetching
* Hide the Loading animation when the data is ready
* Display the data that we fetched on our DOM

1. First, generate a Registered Key called “is\_loading”, this will serve as our flag ⛳.
2. Add a show/hide condition to your lottie component of “is\_loading” is true.
3. Add a show/hide condition to the component you want to show of “is\_loading” is false.
4. On a Computed Field or a Data Output, set the variable “is\_loading” to true, before fetching from the API
5. When resolving the promise of the fetch, set the “is\_loading” variable to false

The result should be something like this!

<https://jmp.sh/mfcr7BnD>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.trysavvy.com/other-useful-docs/work-in-progress/pending/work-in-progress-how-to-show-loading...-while-fetching-or-processing-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
