[]previous and next page

In short

See also the mental model for what a component body does once, and Configuration for autoReactive.

For agentsUpdated
  • Write plain constants in components; they are live when they read signals or props and are used in JSX or a closure.
  • Use useMemo outside components (hooks, modules), for values you want to name, and whenever the constant is not at the top level of the component body.
  • Use <Show>, <Switch> or one returned conditional for branching; never an early return that depends on a signal.
  • Do not reuse a derived constant's name in an inner scope.

See also the mental model for what a component body does once, and Configuration for autoReactive.