# CreateReactorProviderReturn

Defined in: [react/src/createReactorProvider.ts:64](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/react/src/createReactorProvider.ts#L64)

What [createReactorProvider](https://ic-reactor.b3pay.net/v3/libs/functions/createreactorprovider/) returns.

## Type Parameters

### TValue

`TValue` *extends* `object`

### TProps

`TProps` *extends* `object` = \{ \}

## Properties

### ReactorProvider

> **ReactorProvider**: (`props`) => `ReactElement`

Defined in: [react/src/createReactorProvider.ts:76](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/react/src/createReactorProvider.ts#L76)

Builds the value once per mount and provides it to `useReactor`.

Its props, other than `children`, are passed to the factory when it
mounts and are not read again. To build a new value, give the provider a
new `key`: React then unmounts the old tree, which releases the old value,
and mounts a new one.

#### Parameters

##### props

[`ReactorProviderProps`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/reactorproviderprops/)\<`TProps`\>

#### Returns

`ReactElement`

***

### useReactor

> **useReactor**: \{\<`TKey`\>(`key`): `TValue`\[`TKey`\]; (): `TValue`; \}

Defined in: [react/src/createReactorProvider.ts:82](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/react/src/createReactorProvider.ts#L82)

The value the nearest `ReactorProvider` built, or one of its properties
when given that property's name. A hook: call it in a component or a
custom hook below the provider. It throws when there is none.

#### Call Signature

> \<`TKey`\>(`key`): `TValue`\[`TKey`\]

##### Type Parameters

###### TKey

`TKey` *extends* `string` \| `number` \| `symbol`

##### Parameters

###### key

`TKey`

##### Returns

`TValue`\[`TKey`\]

#### Call Signature

> (): `TValue`

##### Returns

`TValue`