Skip to content
IC Reactor

CreateReactorProviderReturn

Defined in: react/src/createReactorProvider.ts:64

What createReactorProvider returns.

TValue extends object

TProps extends object = { }

ReactorProvider: (props) => ReactElement

Defined in: react/src/createReactorProvider.ts:76

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.

ReactorProviderProps<TProps>

ReactElement


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

Defined in: react/src/createReactorProvider.ts:82

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.

<TKey>(key): TValue[TKey]

TKey extends string | number | symbol

TKey

TValue[TKey]

(): TValue

TValue