Skip to content

Ability to disable/enable query in useAtom... hooks #339

@kedom1337

Description

@kedom1337

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.

Link to the TanStack query docs for this pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions