Skip to content
Discussion options

You must be logged in to vote

I found a solution that works for the complex application I work on, and I want to make sure I share what I found for the next person, especially since I didn't find anyone else talking about how to do this sort of thing. My project is using React, but I think these should be usable across frameworks.

Here's a list of what you'll need installed:

  1. TanStack Query
  2. async-mutex

A time-paginated useQueries function

This makes use of a function getDaysArray to split up a start_time and end_time into a list of dates. useQueries uses the dates mapped out so that each queryKey uses the start and end of each day. The timezone is included in the query to ensure timezone differences obtain a unique q…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@wraybowling
Comment options

@louis-young
Comment options

Comment options

You must be logged in to vote
1 reply
@mouhannad-sh
Comment options

Answer selected by wraybowling
Comment options

You must be logged in to vote
1 reply
@wraybowling
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants