# MaelstromExtensionContext
Source: https://docs.maelstrom-ai.co/0.2/reference/react/interfaces/maelstromextensioncontext/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: packages/react/src/lib/extension-types.ts:27

Context handle handed to a `MaelstromExtension`. Exposes a hook that, when called inside the matching Provider tree, returns the stable extension-context subset. The actual runtime object carries more fields, but only those listed here are part of the supported contract.

## Properties

### onOrchestrator?

> `optional` **onOrchestrator?**: (`attach`) => () => `void`

Defined in: packages/react/src/lib/extension-types.ts:29

Observes this extension branch and its descendants before Provider connection; returns registration cleanup.

#### Parameters

##### attach

(`orchestrator`) => () => `void`

#### Returns

() => `void`

* * *

### useMaelstromContext

> **useMaelstromContext**: () => [`MaelstromExtensionContextValue`](https://docs.maelstrom-ai.co/0.2/reference/react/interfaces/maelstromextensioncontextvalue/)

Defined in: packages/react/src/lib/extension-types.ts:32

#### Returns

[`MaelstromExtensionContextValue`](https://docs.maelstrom-ai.co/0.2/reference/react/interfaces/maelstromextensioncontextvalue/)
