What is the role of the dollar sign prefix ($) when passing reactive parameters to wire adapters?
Answer
Basics: @wire configuration is an object. A plain value (fields: [NAME]) is fixed at setup. A string beginning with $ is a reference to a property on the component, which makes the wire reactive: change the property and the wire service provisions new data to the wired property or function.
How it works: Example @wire(getRecord, { recordId: '$recordId', fields: FIELDS }). When recordId is set or changes, the adapter is called with the new value and its result goes into data/error. If any reactive value is undefined, LDS adapters generally do not fire until it is defined, which is why wires wait for @api recordId to arrive. The $ is only for the config object, never in the component code or template.
Advanced / deep dive: Reactivity is triggered by reassignment of the referenced property; mutating a nested field of an object does not trigger it, so assign a new object. The $ references a property on this (top-level), so compute dependent values into a property or getter rather than deep paths. For Apex wires, @wire(getData, { accountId: '$recordId', filter: '$filter' }) re-invokes the cacheable method on any change, so debounce text-input driven properties (for example 300 ms) to avoid a request per keystroke. Wire methods must be cacheable=true, so they cannot perform DML; for actions use imperative calls. To control when a wire runs, set the reactive property to undefined until ready (verify per adapter, as behavior with undefined can vary for Apex). Wired function form @wire(getRecord, {...}) handler({ data, error }) is useful for multiple derived values and for testing.