> 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`).
> - 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.

## 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.

## 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)
- [Component Integration Patterns](https://dev.wix.com/docs/studio-two/code-your-site/code-model/component-integration-patterns.md)