Skip to content

Add react-query and use it for common fetch methods #186

@elboletaire

Description

@elboletaire

Creating the new explorer I've realized having some kind of cache in the fetching methods (like fetch election) would reduce a lot the api calls, giving a better user experience too, since it does not need to refetch already fetched info.

At least the fetch election method should be considered to be added as a react query, but others like the fetch census could be considered as well (with lots of keys in the query key to ensure it properly clears cache on any change).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions