watchIfDev
Overview
Call watch only when running in development mode; returns a no-op stop handle in production.
Signature
watchIfDev(source, cb, options)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| source | WatchSource | WatchSource[] | yes | The reactive source(s) to watch. |
| cb | WatchCallback | yes | Callback invoked when the source changes. |
| options | WatchOptions | no | Options forwarded to watch. |
Returns
WatchStopHandle
A function that stops the watcher (or a no-op in production).
Source
client/lib/utils/dev.js:15