# Refresh page

## 👉 **The Tag** <a href="#the-tag" id="the-tag"></a>

This set of tags allows to refresh a screen connected to external data, performing an API request and updating the data.

{% tabs %}
{% tab title="Pull to refresh" %}

```
[refresh:pull]
```

The screen is refreshed with a pull-down gesture.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh when opening" %}

```
[refresh:always]
```

Every time the page is opened, a remote call is done and the data is updated.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh once" %}

```
[refresh:once]
```

Default behaviour. Remote (external data) pages are called once, the first time they are opened.

**📍 Where to add the tag:** The top-level app page.
{% endtab %}

{% tab title="Refresh every X seconds" %}

```
[refresh:interval:<seconds>]
```

Once the page is opened, a remote call is done every \<seconds>.\
\
Example: `[refresh:interval:300]`\
\
\&#xNAN;***\*Before using it we suggest checking your backend rate limits. We highly recommended not to use it with intervals of less than 10 seconds. Not compatible with the other refresh tags.***<br>

**📍 Where to add the tag:** The top-level app page.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
This feature is useful for any external data that changes often (i.e. real-time stats, attendance list, collective entries, etc.).
{% endhint %}

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-MhxffRX8p8N8ArUgN_p%2Frefresh.gif?alt=media\&token=f87fec5e-7333-4faa-87f6-837632e10a62)

## 🏷️ **How to add the tag** <a href="#how-to-add-the-tag" id="how-to-add-the-tag"></a>

1. Create an app page design. Make sure you add container(s) as needed.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-Mhxg0ihSEUD41He4OdE%2Frefresh1.webp?alt=media\&token=e5284273-4afa-45ed-b254-5dc6eed3f687)

2. **Paste** the tag into the layer name of the **top-level app page**.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-Mhxg6nFA3F6-9q7fFNO%2Fref2.webp?alt=media\&token=cc7eba5d-cb7c-4491-9ad6-fe0265d22662)

&#x20;  &#x20;

{% hint style="info" %}
You can combine <mark style="color:red;">`[refresh:pull]`</mark> with any of the other refresh tags: <mark style="color:red;">`[refresh:always]`</mark>, and <mark style="color:red;">`[refresh:once]`</mark>. However, <mark style="color:red;">`[refresh:always]`</mark> and <mark style="color:red;">`[refresh:once]`</mark> are incompatible with each other. Additionally, <mark style="color:red;">`[refresh:interval:<seconds>]`</mark> is not compatible with any other refresh tags.
{% endhint %}

3. Import Figma file to Bravo.
4. Set up your **binding** as usual. You can use the [example request below](#example-files) to get sample data.

![](https://1444025092-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXpqEanvOhm8vMtIH8i%2F-MhxdMWX77sNYpMqZs_0%2F-MhxgIoZZ-mJanBt1Fta%2Fref4.webp?alt=media\&token=fc8e1b2e-a82e-42f8-b5b6-79935e1176fa)

&#x20;   5\. Preview on Bravo Vision. 🚀

## 💾 Example files <a href="#example-files" id="example-files"></a>

Duplicate the files below to see how to set it up!

{% embed url="<https://www.figma.com/community/file/973892292868502990>" %}

**Example request**: Use this request URL to get sample data for the example app above.

*This API updates the stock price every minute, so wait at least a minute between each pull to refresh to see the price change.*

```
https://finnhub.io/api/v1/quote?symbol=TSLA&token=brhpek7rh5re1lpb2gl0
```
