> 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: Context Provider Resources Reference

## Article: Context Provider Resources Reference

## Article Link: https://dev.wix.com/docs/site-extensions/context-providers/context-provider-resources-reference.md

## Article Content:

# Context Provider Resources Reference

The `resources` section of a context provider manifest identifies the provider component and its context hook. The editor and runtime use this information to load the provider and route its exposed values and functions to connected components.

## Example

The following `resources` section points to a provider in a Studio Two site project:

```ts
resources: {
  client: {
    url: './extensions/site/contexts/team-context/team-context.tsx',
  },
  contextSpecifier: {
    hook: 'useTeamContext',
  },
}
```

## Resources fields

A `resources` section supports the following fields:

| Field | Required | Description |
| --- | --- | --- |
| `client` | Yes | Provider component bundle that runs on the live site. |
| `contextSpecifier` | Yes | Name and module identifier of the provider's context hook. |
| `editor` | No | Separate provider component bundle for design-time behavior. |

## Client resource

The `client` field identifies the provider component that runs on the live site.

| Field | Required | Description |
| --- | --- | --- |
| `url` | Yes | URL or project-relative path to a module whose default export is the provider component. |

The Wix Extension Builder uses a project-relative path for a Studio Two Data Source:

```ts
client: {
  url: './extensions/site/contexts/my-data-source/my-data-source.tsx',
}
```

## Context specifier

The `contextSpecifier` field identifies the hook that the provider component exports.

| Field | Required | Description |
| --- | --- | --- |
| `hook` | Yes | Name of the exported hook. Maximum 100 characters. |
| `moduleSpecifier` | No | Module identifier for the context. Maximum 100 characters. |

Set `hook` to the exact export name. React hook names start with `use`, such as `useTeamContext`.

Connected components receive context values and functions through editor binding as props. They don't call this hook. The provider must still export the hook because the context provider manifest requires it.

For a provider published as an npm package, `moduleSpecifier` identifies the package that exports the context hook. A project-local Studio Two Data Source can omit this field when the Wix Extension Builder doesn't generate one.

## Editor resource

The optional `editor` field identifies a provider component that the editor loads at design time instead of the `client` resource. It can provide placeholder values when the live data isn't available in the editor.

| Field | Required | Description |
| --- | --- | --- |
| `url` | Yes | URL or project-relative path to a module whose default export is the design-time provider component. |

## See also

- [About the Context Provider Manifest](https://dev.wix.com/docs/site-extensions/context-providers/about-the-context-provider-manifest.md)
- [Context Reference](https://dev.wix.com/docs/site-extensions/context-providers/context-reference.md)
- [Data Reference](https://dev.wix.com/docs/site-extensions/context-providers/data-reference.md)