CreateReactorProviderReturn
Defined in: react/src/createReactorProvider.ts:64
What createReactorProvider returns.
Type Parameters
Section titled “Type Parameters”TValue
Section titled “TValue”TValue extends object
TProps
Section titled “TProps”TProps extends object = { }
Properties
Section titled “Properties”ReactorProvider
Section titled “ReactorProvider”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.
Parameters
Section titled “Parameters”ReactorProviderProps<TProps>
Returns
Section titled “Returns”ReactElement
useReactor
Section titled “useReactor”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.
Call Signature
Section titled “Call Signature”<
TKey>(key):TValue[TKey]
Type Parameters
Section titled “Type Parameters”TKey extends string | number | symbol
Parameters
Section titled “Parameters”TKey
Returns
Section titled “Returns”TValue[TKey]
Call Signature
Section titled “Call Signature”():
TValue
Returns
Section titled “Returns”TValue