Overview
ThegetOptions() function returns the current React Scan configuration options as a reactive signal.
Signature
Parameters
This function takes no parameters.Returns
A Preact signal containing the current options object. Access the value using
.value.Usage
Get Current Options
Check Specific Option
React to Changes
Use in React Component
Conditional Logic Based on Options
Signal API
The returned value is a Preact signal, which provides reactive updates:- Read value: Use
.valueto access the current options - Subscribe to changes: Signals automatically track dependencies in
effect()or React components using@preact/signals-react - Type-safe: The signal is typed as
Signal<Options>for full TypeScript support
Default Values
When React Scan initializes, the following default values are used:See Also
- setOptions() - Update options at runtime
- scan() - Initialize with options
- Options - Full options reference