<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp" -->

---
title: Doing pagination with React Query | daily.dev
description: Use React-Query to implement pagination with React Query Back. Using React Query allows developers to separate the data into pages for the end-users. As a...
canonical: https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Doing pagination with React Query | daily.dev
og:description: Use React-Query to implement pagination with React Query Back. Using React Query allows developers to separate the data into pages for the end-users. As a...
og:url: https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp
og:image: https://api.daily.dev/og/posts/KfElj5ZqP.png
og:image:alt: Doing pagination with React Query
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Doing pagination with React Query

**[asayer](https://daily.dev/sources/asayer)** · 10 min read · 13 upvotes · 3 comments

## Summary

Use React-Query to implement pagination with React Query Back. Using React Query allows developers to separate the data into pages for the end-users. As a result, chunks of large datasets are displayed on different pages. As the user interacts with the pagination controls, data for each page is fetched and displayed.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.openreplay.com/doing-pagination-with-react-query/>

## Community discussion

Top comments from developers on daily.dev.

**@mike44nyc** · 0 upvotes

> Thank you for sharing.

**@jahidul** · 0 upvotes

> Thanks for sharing.. But i think there is a
> optimized way if you  dynamic `button` component and pass page number

**@manelzada** · 0 upvotes

> Thanks!

---

Tags: [#axios](https://daily.dev/tags/axios), [#react-query](https://daily.dev/tags/react-query)

[View this post on daily.dev](https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Doing pagination with React Query","url":"https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp"},"datePublished":"2023-01-17T05:15:27.783Z","dateModified":"2023-01-17T05:15:27.779Z","description":"Use React-Query to implement pagination with React Query Back. Using React Query allows developers to separate the data into pages for the end-users. As a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3cdf07857511a36b5c3f8aed0c5fd964","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3cdf07857511a36b5c3f8aed0c5fd964","isAccessibleForFree":true,"articleSection":"asayer","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"asayer","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/be8d9d38650943c8a1718ba79f23e9ac","url":"https://daily.dev/sources/asayer"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":13},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"axios,react-query","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"asayer","item":"https://daily.dev/sources/asayer"},{"@type":"ListItem","position":3,"name":"Doing pagination with React Query"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/doing-pagination-with-react-query-kfelj5zqp","comment":[{"@type":"Comment","text":"Thank you for sharing.","datePublished":"2023-01-18T21:25:40.615Z","url":"https://daily.dev/posts/KfElj5ZqP#c--EW1etD8l","author":{"@type":"Person","name":"Mike","url":"https://daily.dev/mike44nyc","image":"https://avatars.githubusercontent.com/u/88614730?v=4"}},{"@type":"Comment","text":"Thanks for sharing… But i think there is a\noptimized way if you  dynamic button component and pass page number","datePublished":"2023-01-17T05:59:04.004Z","url":"https://daily.dev/posts/KfElj5ZqP#c-wE3fqsKLQ","author":{"@type":"Person","name":"Jahidul Islam (Saeid)","url":"https://daily.dev/jahidul","image":"https://media.daily.dev/image/upload/s--Zk9Mb3ia--/f_auto/v1748843009/avatars/avatar_h87UPCpqKaFKBr83oGfF5?_a=BAMClqUq0"}},{"@type":"Comment","text":"Thanks!","datePublished":"2023-01-22T16:22:24.774Z","url":"https://daily.dev/posts/KfElj5ZqP#c-C2qH2deWd","author":{"@type":"Person","name":"Emmanoel","url":"https://daily.dev/manelzada","image":"https://avatars.githubusercontent.com/u/45775404?v=4"}}]}
```

