Overview
Thescan() function is the primary API for initializing React Scan. It starts the scanning process and applies the provided configuration options.
Signature
Parameters
Optional configuration object to customize React Scan behavior. See Options for all available settings.
Returns
void - This function does not return a value.
Usage
Basic Usage
With Options
Development Only
Force Production Mode
Behavior
- If
enabledisfalseandshowToolbaris not explicitlytrue, React Scan will not initialize - React Scan will not run inside iframes unless
allowInIframeis set totrue - By default, React Scan only runs in development mode. Use
dangerouslyForceRunInProductionto override this behavior
See Also
- useScan() - React hook version of scan()
- setOptions() - Update options at runtime
- Options - Full options reference