[]previous and next page

How it is implemented

A source-to-source pass runs before JSX compilation (deriveLocals).

For agentsUpdated

A source-to-source pass runs before JSX compilation (deriveLocals). const double = count() * 2 becomes const double = _$derived(() => (count() * 2)), every read of double in JSX or a closure becomes double.value, and a call double() is left as written because the derived value is callable. derived is a documented export of @shadow-js/web (and of @shadow-js/web/server): see derived. It wraps a useMemo, which is why the caching and dependency tracking behave exactly like a memo.

Source maps point into the rewritten text for rewritten lines; line numbers are unchanged.