tim-smart / tim-smart/effect-atom
Ability to disable/enable query in `useAtom...` hooks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 792
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
I have two queries from AtomHttpApi the second one depending on the result of the first one. In TanStack query we have the ability to declaratively enable/disable a query by simply passing a boolean { enabled: firstQueryResult } to the options of the hook making sure that the second one only fires when the result of the first one is truthy. It would be nice for useAtom... hooks to support the same thing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the useAtom... hooks and their AtomHttpApi query options, then compare the requested behavior with the linked TanStack Query dependent-queries guidance. Check how query execution is currently triggered and identify the relevant tests or test entry points. Done means callers can declaratively control whether a query fires with an enabled boolean, including when it depends on another query's result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100