redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

Lazy infinite queries hook

Open Innders opened this issue 6 months ago • 4 comments

The ability to use infinite queries with a lazy hook just like normal lazy queries.

useLazyGetPokemonInfiniteQuery.

Use case

The ability to get the data from multiple different arguments. Currently there is no way to dynamically call the infiniteQuery for with different arguments as hooks are not loopable.

const [getPokemon] = useLazyGetPokemonInfiniteQuery()

  for (const type in types) {
    getPokemon(type)
  }

Issues

How do you deal with the fetchNextPage

Innders avatar May 30 '25 08:05 Innders