Type Alias: UseRx_Options<TIn, TOut, ThisArg, Merge>
UseRx_Options<
TIn,TOut,ThisArg,Merge> =object
Defined in: packages/rx-react/src/useRx.ts:186
Type Parameters
TIn
TIn
TOut
TOut
ThisArg
ThisArg = unknown
Merge
Merge = boolean
Properties
defer?
optionaldefer?:number
Defined in: packages/rx-react/src/useRx.ts:188
Delay in milliseconds to debounce or throttle state updates.
deferOptions?
optionaldeferOptions?:DeferredOptions<ThisArg>
Defined in: packages/rx-react/src/useRx.ts:190
Configuration for the deferral logic (e.g., throttle vs debounce).
initialValue?
optionalinitialValue?:TOut
Defined in: packages/rx-react/src/useRx.ts:194
The value used during the initial render if the observable has not yet emitted.
merge?
optionalmerge?:Merge
Defined in: packages/rx-react/src/useRx.ts:199
If true, performs a shallow merge ({...prev, ...next}) when the value is an object. New properties will overwrite existing ones.
skipEmits?
optionalskipEmits?:number
Defined in: packages/rx-react/src/useRx.ts:205
Number of initial emissions to ignore from the source observable.
Default: 1 if source is a BehaviorSubject, otherwise 0.
transform?
optionaltransform?: (newValue?,prevValue?,prevError?) =>TOut|undefined|void
Defined in: packages/rx-react/src/useRx.ts:214
A callback to modify the incoming value before it hits the state. Return undefined to use the raw value, or the previous value to skip the update.
Parameters
newValue?
TIn
new value received in the source observable
prevValue?
TOut
previously transformed value (if any)
prevError?
previous error (if any)
Returns
TOut | undefined | void