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 extends boolean = boolean
Properties
defer?
optionaldefer?:number
Defined in: packages/rx-react/src/useRx.ts:193
Delay in milliseconds to debounce or throttle state updates.
deferOptions?
optionaldeferOptions?:DeferredOptions<ThisArg>
Defined in: packages/rx-react/src/useRx.ts:196
Configuration for the deferral logic (e.g., throttle vs debounce).
initialValue?
optionalinitialValue?:TOut
Defined in: packages/rx-react/src/useRx.ts:201
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:207
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:214
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:224
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