{"_id":"react-firebase-pagination","_rev":"53-d1fdc1f8fa9de34ae0a12dc413e4d4ba","name":"react-firebase-pagination","dist-tags":{"latest":"2.0.0"},"versions":{"1.1.1":{"name":"react-firebase-pagination","version":"1.1.1","keywords":["react","firebase","pagination","firebase pagination","firebase-pagination","react firebase pagination","react-firebase-pagination"],"author":{"name":"Chirag Codealchemy"},"license":"MIT","_id":"react-firebase-pagination@1.1.1","maintainers":[{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},{"name":"chirag7096","email":"chiraghpatel03@gmail.com"}],"dist":{"shasum":"d55d2154b538f7b3c2c135cf0be69337a8159dc3","tarball":"https://registry.npmjs.org/react-firebase-pagination/-/react-firebase-pagination-1.1.1.tgz","fileCount":18,"integrity":"sha512-xSU0U/SX1tBdD6KwzafZifjUaKb6l8Z3GsHXLiz8i+/lYnvMz6bIaQXtJzA9N98k9JxBcdwfAZtSj3rN5ezCfQ==","signatures":[{"sig":"MEQCIBw7PaZC5eRtSGdkWSD0W2glsUzeXYBxkAPdYLq+h/vLAiAgJo5PatYBNQlSJ7nu1vAm+6b6gYv+w3/EDDlzd9a80A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19717},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","scripts":{"lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","build":"yarn build:esm && yarn build:cjs","prepare":"yarn build","prettier":"prettier --write \"src/**.{js,ts,jsx,tsx}\"","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc","prepublishOnly":"yarn prettier && yarn lint"},"_npmUser":{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},"repository":{"url":"git+https://github.com/chirag-codealchemy/react-firebase-pagination.git","type":"git"},"description":"A React Hook that makes it easy to paginate Firestore collections. This hook provides _cumulative_ pagination and maintains references to previous documents, so it might not be suitable for large document sets.","directories":{},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","eslint":"^8.42.0","firebase":"^9","prettier":"^2.8.8","react-dom":"^18.2.0","typescript":"5.1.3","@types/react":"^18.2.8","eslint-plugin-react":"^7.32.2","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.8","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^5.59.8"},"peerDependencies":{"react":">=16","firebase":">=9"},"_npmOperationalInternal":{"tmp":"tmp/react-firebase-pagination_1.1.1_1688800180787_0.6948837325933233","host":"s3://npm-registry-packages"}},"1.1.14":{"name":"react-firebase-pagination","version":"1.1.14","keywords":["react","firebase","pagination","firebase pagination","firebase-pagination","react firebase pagination","react-firebase-pagination"],"author":{"name":"Chirag Codealchemy"},"license":"MIT","_id":"react-firebase-pagination@1.1.14","maintainers":[{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},{"name":"chirag7096","email":"chiraghpatel03@gmail.com"}],"homepage":"https://github.com/chirag-codealchemy/react-firebase-pagination#readme","bugs":{"url":"https://github.com/chirag-codealchemy/react-firebase-pagination/issues"},"dist":{"shasum":"6e127c47f8e359c1c3c2afaf861216cee659862f","tarball":"https://registry.npmjs.org/react-firebase-pagination/-/react-firebase-pagination-1.1.14.tgz","fileCount":14,"integrity":"sha512-1mL4JXefCyut7I50iQtvin3NIxfxQ4SmdqW2pYepeMXkc6RcindOq0ipBvzhXdg6UDIlSW+R88Bu0oFLOLgRAQ==","signatures":[{"sig":"MEYCIQDP9Uh16XWPgXGXZvkFz5ji1wIqzuQGLhAF6VQynrBqpwIhAKGwo3H+ylcmwCNjtsTVxDsQttyV2B64W0JveqopVEPv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22189},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","gitHead":"17f556d139e64f86e4b2823d36fd2248dbef84a5","scripts":{"lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","build":"yarn build:esm && yarn build:cjs","prepare":"yarn build","prettier":"prettier --write \"src/**.{js,ts,jsx,tsx}\"","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc","prepublishOnly":"yarn prettier && yarn lint"},"_npmUser":{"name":"chirag7096","email":"chiraghpatel03@gmail.com"},"repository":{"url":"git+https://github.com/chirag-codealchemy/react-firebase-pagination.git","type":"git"},"_npmVersion":"9.6.7","description":"A React Hook that makes it easy to paginate Firestore collections.\r This hook provides _cumulative_ pagination and maintains references to previous documents, so it might not be suitable for large document sets.","directories":{},"_nodeVersion":"20.3.1","_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","eslint":"^8.42.0","firebase":"^9","prettier":"^2.8.8","react-dom":"^18.2.0","typescript":"5.1.3","@types/react":"^18.2.8","eslint-plugin-react":"^7.32.2","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.8","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^5.59.8"},"peerDependencies":{"react":">=16","firebase":">=9"},"_npmOperationalInternal":{"tmp":"tmp/react-firebase-pagination_1.1.14_1688889167943_0.13469046474543567","host":"s3://npm-registry-packages"}},"1.1.16":{"name":"react-firebase-pagination","version":"1.1.16","keywords":["expo","next","react","firebase","pagination","firebase pagination","firebase-pagination","expo firebase pagination","expo-firebase-pagination","next-firebase-pagination","next firebase pagination","react firebase pagination","react-firebase-pagination"],"author":{"name":"Patel Chirag"},"license":"MIT","_id":"react-firebase-pagination@1.1.16","maintainers":[{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},{"name":"chirag7096","email":"chiraghpatel03@gmail.com"}],"dist":{"shasum":"a9690dcb725de2bde23f323d5139f5b7c4e68a22","tarball":"https://registry.npmjs.org/react-firebase-pagination/-/react-firebase-pagination-1.1.16.tgz","fileCount":21,"integrity":"sha512-vADx64Fag9jfA06UBwtZvI6TvwDVbp1yt05qfmzChQcuYiow918f6Le3ZN88uy80mLtuhZENL7zHD8UIBVbFlA==","signatures":[{"sig":"MEYCIQC2zAxPae0feJmp05loqsP4lFutI8HhcZ1F9uHeaC98cQIhAJr9sv5uCev6KsSg96UWQaQKZ4zcYAEqhWUq91hkYo4+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29967},"main":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","scripts":{"lint":"eslint \"{**/*,*}.{js,ts,jsx,tsx}\"","build":"yarn build:esm && yarn build:cjs","prepare":"yarn build","prettier":"prettier --write \"src/**.{js,ts,jsx,tsx}\"","build:cjs":"tsc --module commonjs --outDir dist/cjs","build:esm":"tsc","prepublishOnly":"yarn prettier && yarn lint"},"_npmUser":{"name":"chirag7096","email":"chiraghpatel03@gmail.com"},"repository":{"url":"git+https://github.com/Chirag7096/react-firebase-pagination.git","type":"git"},"description":"A React Hook that makes it easy to paginate Firestore collections. This hook provides _cumulative_ pagination and maintains references to previous documents, so it might not be suitable for large document sets.","directories":{},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.2.0","eslint":"^8.42.0","firebase":"^9","prettier":"^2.8.8","react-dom":"^18.2.0","typescript":"5.1.3","@types/react":"^18.2.8","eslint-plugin-react":"^7.32.2","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.8","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^5.59.8"},"peerDependencies":{"react":">=16","firebase":">=9"},"_npmOperationalInternal":{"tmp":"tmp/react-firebase-pagination_1.1.16_1691336137118_0.7738597294699863","host":"s3://npm-registry-packages"}},"2.0.0":{"_id":"react-firebase-pagination@2.0.0","bugs":{"url":"https://github.com/Chirag7096/react-firebase-pagination/issues"},"dist":{"shasum":"441b56b5680daa5ef841a2b0ddead8155f76462a","tarball":"https://registry.npmjs.org/react-firebase-pagination/-/react-firebase-pagination-2.0.0.tgz","fileCount":10,"integrity":"sha512-5buigQfEEJ2eyWgeW/cipiz68+1U70ox6CKvd20vKMgG4Ee9EJq8vGXUmaOCkg8aYalRwD//lH4MJRdH7B5eqQ==","signatures":[{"sig":"MEUCIQDUZIpo97Zl4PMVNw8KI81lOFcDv5bZASviKTKIZM8gMAIgCtvcdOOO5KYJHryyKogE6MLYjwik4wGXVHfYjy6YtbM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID9wnBDL9fsQ88VBVuCa2Oh3OMZv/4Ia44YG2MrNdCtDAiAsGhoCirwdsJmTJB8twbqYwPt6eir37dgokcb1Hc8M2Q=="}],"unpackedSize":22154},"main":"./dist/index.js","name":"react-firebase-pagination","type":"module","types":"./dist/index.d.ts","author":{"name":"Chirag Patel"},"module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"6b156a9e800c5b4d09c4d340a93ef8bbbbb4adcc","license":"MIT","scripts":{"lint":"eslint .","build":"tsc","prepare":"bun run build","prettier":"prettier --write \"src/**/*.{js,ts,jsx,tsx}\"","typecheck":"tsc --noEmit","prepublishOnly":"bun prettier && bun lint"},"version":"2.0.0","_npmUser":{"name":"chirag7096","email":"chiraghpatel03@gmail.com"},"homepage":"https://github.com/Chirag7096/react-firebase-pagination#readme","keywords":["expo","next","react","firebase","pagination","firebase pagination","firebase-pagination","expo firebase pagination","expo-firebase-pagination","next-firebase-pagination","next firebase pagination","react firebase pagination","react-firebase-pagination"],"repository":{"url":"git+https://github.com/Chirag7096/react-firebase-pagination.git","type":"git"},"_npmVersion":"11.19.0","description":"[![npm version](https://badge.fury.io/js/react-firebase-pagination.svg)](https://badge.fury.io/js/react-firebase-pagination)","directories":{},"maintainers":[{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},{"name":"chirag7096","email":"chiraghpatel03@gmail.com"}],"_nodeVersion":"26.8.1","_hasShrinkwrap":false,"devDependencies":{"react":"^19.3.0","eslint":"^9","globals":"^17.12.0","firebase":"^12.19.0","prettier":"^3.9.8","react-dom":"^19.3.0","@eslint/js":"^10.0.1","typescript":"7.0.2","@babel/core":"^8.0.6","@types/react":"^19.3.0","@babel/eslint-parser":"^7.29.9","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.6","@babel/preset-typescript":"^8.0.1","eslint-plugin-react-hooks":"^7.1.1"},"peerDependencies":{"react":">=16","firebase":">=9"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-firebase-pagination_2.0.0_1790265654591_0.9433966725103495"}}},"time":{"created":"2023-06-03T07:18:49.952Z","modified":"2026-09-24T16:00:54.856Z","1.0.0":"2023-06-03T07:18:50.154Z","1.0.1":"2023-06-03T08:35:12.719Z","1.0.2":"2023-06-03T08:44:46.450Z","1.0.3":"2023-06-03T09:00:34.524Z","1.0.4":"2023-06-05T04:18:22.454Z","1.0.5":"2023-06-05T04:48:00.941Z","1.0.6":"2023-06-05T05:07:20.004Z","1.0.7":"2023-06-06T06:13:32.477Z","1.0.8":"2023-06-06T06:48:43.029Z","1.0.9":"2023-06-06T06:53:03.928Z","1.0.91":"2023-06-06T06:59:46.049Z","1.0.92":"2023-06-06T08:18:54.171Z","1.0.93":"2023-06-07T12:59:25.473Z","1.0.94":"2023-06-08T09:01:38.375Z","1.0.95":"2023-06-08T09:05:11.845Z","1.0.96":"2023-06-09T04:29:08.170Z","1.0.97":"2023-06-09T11:18:30.682Z","1.0.98":"2023-06-09T11:19:53.488Z","1.1.0":"2023-07-08T06:46:13.552Z","1.1.1":"2023-07-08T07:09:40.996Z","1.1.11":"2023-07-08T08:08:09.639Z","1.1.12":"2023-07-09T07:44:26.819Z","1.1.13":"2023-07-09T07:49:41.523Z","1.1.14":"2023-07-09T07:52:48.119Z","1.1.16":"2023-08-06T15:35:37.373Z","2.0.0":"2026-09-24T16:00:54.674Z"},"author":{"name":"Chirag Patel"},"license":"MIT","keywords":["expo","next","react","firebase","pagination","firebase pagination","firebase-pagination","expo firebase pagination","expo-firebase-pagination","next-firebase-pagination","next firebase pagination","react firebase pagination","react-firebase-pagination"],"repository":{"url":"git+https://github.com/Chirag7096/react-firebase-pagination.git","type":"git"},"description":"[![npm version](https://badge.fury.io/js/react-firebase-pagination.svg)](https://badge.fury.io/js/react-firebase-pagination)","maintainers":[{"name":"chirag_codealchemy","email":"chirag.codealchemy@gmail.com"},{"name":"chirag7096","email":"chiraghpatel03@gmail.com"}],"readme":"[![npm version](https://badge.fury.io/js/react-firebase-pagination.svg)](https://badge.fury.io/js/react-firebase-pagination)\n\n# react-firebase-pagination\n\nA React Hook that makes it easy to paginate Firestore collections.\nThis hook provides _cumulative_ pagination and maintains references to previous documents, so it might not be suitable for large document sets.\n\n## Support for Firebase 9\n\nsupport for Firebase 9 and are backwards _incompatible_ with previous versions of Firebase.\n\n## Install\n\n```\nnpm install react-firebase-pagination\n```\n\nOR\n\n```\nyarn add react-firebase-pagination\n```\n\n### Options\n\n| **prop**   | **Type**  | **Default** | **description**                                                                                                                                                                                      | **Required** |\n| ---------- | --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |\n| query      | `Query`   | —           | The Firestore query. Safe to create inline each render; identity is driven by `queryKey`.                                                                                                            | ✔            |\n| queryKey   | `unknown[]` | —         | Stable key for the logical query (sorts, filters, collection). Change it when the query meaning changes — pagination resets to page 1.                                                               | ✔            |\n| pageSize   | `Number`  | 10          | The number of items per page.                                                                                                                                                                        |              |\n| pageByPage | `Boolean` | false       | When this option is True, data is loaded page by page like Google search, and when it's not, it loads data on a single page and appends new data on the bottom of current data like a Facebook feed. |              |\n| liveUpdate | `Boolean` | false       | Add Firebase snapshot listener to update data live                                                                                                                                                   |              |\n\n### State\n\n| **prop**    | **value**  | **description**                                                                                             |\n| ----------- | ---------- | ----------------------------------------------------------------------------------------------------------- |\n| loading     | `Boolean`  | Is true when a page is loading.                                                                             |\n| data        | `Object`   | [Data Object](#data-object-contain)                                                                         |\n| getNext     | `Function` | W'll render the next page when called. (Take no arguments)                                                  |\n| getPrevious | `Function` | W'll render the previous page when called. (Take no arguments and work only in [pageByPage](#options) mode) |\n| hasNext     | `Boolean`  | It's true when the next page has data.                                                                      |\n| hasPrevious | `Boolean`  | It's true when a previous page has data. (Work only in [pageByPage](#options) mode)                         |\n\n### Data Object Contain\n\n| **prop**    | **value**   | **description**                                                                                    |\n| ----------- | ----------- | -------------------------------------------------------------------------------------------------- |\n| docs        | `Documents` | Document Array.                                                                                    |\n| totalDocs   | `Number`    | Total Document count.                                                                              |\n| totalPages  | `Number`    | Total Page count.                                                                                  |\n| currentPage | `Number`    | Current Page Number in [pageByPage](#options) mode or how may time's data load on the current page |\n\n## Example Use\n\nThis is an example of a [Firestore](https://firebase.google.com/docs/firestore/) query. You can rebuild `query(...)` every render — pass a `queryKey` so the hook only resets when sorts/filters actually change:\n\n```jsx\nimport usePagination from 'react-firebase-pagination'\nimport { query, orderBy, collection } from 'firebase/firestore'\nimport db from './your/database/path'\n\nconst App = () => {\n  const [sort, setSort] = useState('newest') // 'newest' | 'oldest' | ...\n\n  const mainQuery = query(\n    collection(db, '[collection]'),\n    sort === 'oldest'\n      ? orderBy('created_timestamp', 'asc')\n      : orderBy('created_timestamp', 'desc'),\n  )\n\n  const { getNext, getPrevious, data, loading } = usePagination({\n    pageSize: 10,\n    pageByPage: true,\n    query: mainQuery,\n    queryKey: ['[collection]', sort],\n  })\n\n  if (loading) {\n    return <LoadingComponent />\n  }\n\n  ...\n}\n```","readmeFilename":"README.md","homepage":"https://github.com/Chirag7096/react-firebase-pagination#readme","bugs":{"url":"https://github.com/Chirag7096/react-firebase-pagination/issues"}}