[]previous and next page

Things that look like React but are not

Behavior that is still being built is tracked in docs/STATUS.md; the router, SSR and integrations for a Next.js app are on the Next.js page.

For agentsUpdated
  • Reading state without calling it. count is a function. In JSX, {count} works (a function child is an accessor), but count + 1 does not. Call it: count() + 1.
  • Early returns are not live. See Lists and conditionals.
  • Hooks are not order dependent. A useEffect inside an if is valid; hooks attach to the owner that is running, not to a slot.
  • Setting state in the body is allowed. The body is setup, not a render, so it does not loop.
  • import { memo } from "@shadow-js/web" is not React.memo. It is the helper the compiler's output calls.
  • Props read once. useStore(props.start) snapshots; use an effect that calls setValue(props.start) to sync.
  • key is not list identity on an element. It is accepted and ignored; <For key={...}> keys a list. No StrictMode, no double invocation: nothing runs twice in development.
  • Context values are read once. Provide an accessor or a store for values that change.
  • Module-level state is shared on the server. See the caution under Redux and Zustand.

Behavior that is still being built is tracked in docs/STATUS.md; the router, SSR and integrations for a Next.js app are on the Next.js page.