Skip to content

refactor(tanstack query): signal render reactivity via onRender handler - #76

Merged
kurtaqui merged 4 commits into
mainfrom
feature/signal-improve-calls
Jun 9, 2026
Merged

kurtaqui merged 4 commits into
mainfrom
feature/signal-improve-calls

Conversation

@kurtaqui

@kurtaqui kurtaqui commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

kurtaqui and others added 4 commits June 8, 2026 11:16
…handler

The shared observer bases no longer hard-code setOptions/setQueries in
hostWillRender. They just fire the optional `onRender` handler, letting each
consumer opt in:

- classic useQuery/useQueries pass `onRender: () => reArm()` for pull-based
  reactivity (their only reactivity), via a lazily-referenced handle.
- signal $useQuery/$useQueries omit `onRender` entirely — they react purely
  through their client `effect` on the options signal plus the server settle.

`onRender` narrows to `() => void` (no consumer needs the result). Removes the
stale "consider to remove for signal query" TODO. The pull-based array-growth
test for the signal hook is dropped (intentionally-removed behavior; the
signal-driven growth test and the classic pull test cover the paths).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kurtaqui
kurtaqui merged commit c7ce9c0 into main Jun 9, 2026
1 check passed
@kurtaqui
kurtaqui deleted the feature/signal-improve-calls branch June 9, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants