Skip to content

[Question] The reason of resetting the query when there's an error #99

@icodesign

Description

@icodesign

https://github.com/jotaijs/jotai-tanstack-query/blob/ddee97ba32cedac0c99d39b917533b2ea3994604/src/baseAtomWithQuery.ts#L108C9-L110C10

The query cache will be deleted when an error was thrown in the query function and the query was no longer active (for example, a network issue). However, most of the time, we'd like to still display the cache data.

Any background on this piece of code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions