> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: About Data Sources

## Article: About Data Sources

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/code-model/data-sources/about-data-sources.md

## Article Content:

# About Data Sources

A [context provider](https://dev.wix.com/docs/overview/extensions-framework/site-extensions/context-providers.md) is a logical component that shares state and behavior with Editor React Components in Studio Two. The Studio Two editor and the Wix Extension Builder call this extension a **Data Source**. Its generated code uses context provider APIs and React Context, documented in [About Context Provider Extensions](https://dev.wix.com/docs/site-extensions/context-providers/about-context-provider-extensions.md).

## How Data Sources work in Studio Two

A Data Source connects several ERCs to the same state and functions through editor binding:

1. You add the Data Source extension from the **Code** tab through the **Wix Extension Builder**.
2. The generated context provider manifest declares the values and functions it exposes.
3. The generated React provider component implements those values and functions.
4. A Wix user attaches the Data Source to a page, container, or section. For how to attach it, see [Connect to Source](https://support.wix.com/en/article/connect-to-source). To add the section first, see [Studio Two Editor: Adding and Managing Sections](https://support.wix.com/en/article/studio-two-editor-adding-and-managing-sections).
5. The Wix user connects nested ERC props to compatible exposed items.
6. When the shared state changes at runtime, the connected ERCs receive updated prop values.

An ERC can also skip editor binding and call the Data Source's hook in its own code. The ERC then reads every value and function the Data Source exposes, but works only inside an area that has the Data Source attached. To compare the two approaches, see [Component Integration Patterns](https://dev.wix.com/docs/studio-two/code-your-site/code-model/component-integration-patterns.md#call-a-contexts-hook-in-an-ercs-code).

## Wix and custom Data Sources

Wix business solutions provide Data Sources for coordinated site experiences. For example, the Wix Stores **Product** Data Source provides the Product Context, which holds a product's details, the selected options, pricing, and stock, along with functions such as adding the selection to the cart. An ERC can connect to it through editor binding, or read it directly by calling the context's hook. For every context Wix provides, see [Wix Business Solution Contexts](https://dev.wix.com/docs/contexts.md). Wix also creates Data Sources for each CMS collection, so you can connect elements to collection data. Learn more about [CMS Data Sources](https://dev.wix.com/docs/studio-two/code-your-site/work-with-data/data-sources-and-dynamic-pages/about-cms-data-sources.md).

You can add a custom Data Source when several components need site-specific state. For example, a team page can share the selected department, a filtered teammate list, and a function for changing the filter. Your ERCs can connect to a custom Data Source through editor binding, or [call its hook in their own code](https://dev.wix.com/docs/studio-two/code-your-site/code-model/editor-react-components/use-a-data-source-in-an-editor-react-component-in-studio-two.md).

## Data Source files

A custom Data Source has 2 files:

- A context provider manifest that declares configuration inputs and exposed items.
- A React provider component that implements the state and behavior.

For the files and manifest fields, see [About Context Provider Extensions](https://dev.wix.com/docs/site-extensions/context-providers/about-context-provider-extensions.md) in Extension References.

## See also

- [Add a Data Source Extension in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/code-model/data-sources/add-a-data-source-extension-in-studio-two.md)
- [Build a Data Source in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/code-model/data-sources/build-a-data-source-in-studio-two.md)
- [Context Providers](https://dev.wix.com/docs/overview/extensions-framework/site-extensions/context-providers.md)
- [Context Provider Extension Files and Code](https://dev.wix.com/docs/site-extensions/context-providers/context-provider-extension-files-and-code.md)
- [Use a Data Source in an Editor React Component in Studio Two](https://dev.wix.com/docs/studio-two/code-your-site/code-model/editor-react-components/use-a-data-source-in-an-editor-react-component-in-studio-two.md)
- [Component Integration Patterns](https://dev.wix.com/docs/studio-two/code-your-site/code-model/component-integration-patterns.md)