---
url: /reference/items/FetchShopifySection.md
---
# FetchShopifySection
The `FetchShopifySection` component extends the [`Fetch` component](../Fetch/index.md) to refresh parts of a page through Shopify's stable [Section Rendering API](https://shopify.dev/docs/api/ajax/section-rendering). The sections to update are declared with the [`sections` option](./js-api.md#sections) instead of being written in the URL, so the element's `href` stays a clean, working link when JavaScript is unavailable, and the section endpoint never appears in the address bar.
It needs no extra package: the Section Rendering API is available on every theme today.
## Usage
Register the component in your JavaScript app:
```js
import { registerComponents } from '@studiometa/js-toolkit';
import { FetchShopifySection } from '@studiometa/ui';
registerComponents(FetchShopifySection);
```
Trigger a refresh from a link or a form, listing the section IDs to update with the [`sections` option](./js-api.md#sections). Keep those IDs out of the `href`: the component adds them to the request itself.
```liquid
Sort by price
{% comment %} `{% section %}` already outputs the `shopify-section-*` wrapper matched by id. {% endcomment %}
{% section 'main-collection-product-grid' %}
{% section 'collection-results-count' %}
```
* **Without JavaScript**, the link navigates to {{ collection.url }}?sort\_by=price-ascending — a normal, fully rendered page.
* **With JavaScript**, the component requests `…?sort_by=price-ascending§ions=main-collection-product-grid,collection-results-count`, unwraps the JSON response and swaps each `shopify-section-*` wrapper in place.
Because `FetchShopifySection` extends `Fetch`, it inherits every [option](../Fetch/js-api.md), getter, method and event of the base component, including the [`mode`](../Fetch/js-api.md#mode), [`history`](../Fetch/js-api.md#history) and [`viewTransition`](../Fetch/js-api.md#viewtransition) options and the loader pattern built on its [events](../Fetch/js-api.md#events). The `sections` option is a value of the [`params` option](../Fetch/js-api.md#params), and history records the destination, not the request URL. So `sections` never reaches the address bar, and back and forward navigation ask for the sections again. See [extending Fetch](../Fetch/js-api.md#extending-fetch) for the steps the component changes.
::: tip Forms
Use a `