Skip to content

feat(fetchium): add an enabled option to useQuery - #85

Merged
jimmy-phantom merged 4 commits into
mainfrom
aaron-c/usequery-enabled
Nov 5, 2026
Merged

jimmy-phantom merged 4 commits into
mainfrom
aaron-c/usequery-enabled

Conversation

@iamacook

@iamacook iamacook commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds an optional third argument to useQuery: { enabled?: boolean }, defaulting to true.

When disabled, the hook skips fetching and subscribing and returns a pending result. Re-enabling activates the query with the latest parameters; disabling releases the hook’s subscription.

Includes API documentation and tests for toggling, parameter changes, and stream cleanup.

@iamacook iamacook self-assigned this Oct 30, 2026
@iamacook
iamacook requested review from a team and pzuraq as code owners October 30, 2026 19:22
@jimmy-phantom

Copy link
Copy Markdown
Collaborator

@iamacook looks good, but could you fix the lint errors?

moimikey
moimikey previously approved these changes Nov 4, 2026
Comment thread packages/fetchium/src/QueryResult.ts Resolved
Comment thread packages/fetchium/src/QueryResult.ts Resolved
@jimmy-phantom
jimmy-phantom merged commit 7f40ee2 into main Nov 5, 2026
1 check passed
@jimmy-phantom
jimmy-phantom deleted the aaron-c/usequery-enabled branch November 5, 2026 21:05
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.

3 participants