{"id":19156748,"url":"https://github.com/jackall3n/next-query","last_synced_at":"2025-11-08T04:03:48.348Z","repository":{"id":57679706,"uuid":"492584527","full_name":"jackall3n/next-query","owner":"jackall3n","description":"A Next.js hook designed to parse and return query-string params on every render, even on load","archived":false,"fork":false,"pushed_at":"2023-12-15T14:56:09.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T07:37:06.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/next-query","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackall3n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-15T19:32:08.000Z","updated_at":"2022-05-15T19:34:38.000Z","dependencies_parsed_at":"2024-11-09T08:47:47.963Z","dependency_job_id":null,"html_url":"https://github.com/jackall3n/next-query","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"7e4628454cd9af9def63dfd5a3e26db037cd4485"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackall3n/next-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fnext-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fnext-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fnext-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fnext-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackall3n","download_url":"https://codeload.github.com/jackall3n/next-query/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fnext-query/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263636513,"owners_count":23492270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T08:35:49.762Z","updated_at":"2025-11-08T04:03:48.310Z","avatar_url":"https://github.com/jackall3n.png","language":"TypeScript","readme":"# next-query 🔎\n\n\u003cp\u003e\n\u003ca href=\"https://www.npmjs.com/next-query\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/next-query.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/next-query\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/next-query.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/next-query\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/next-query.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Blurb\n\nA hook for Next.js which can parse and return a query-string object, even on load.\n\n## Installation\n\n```shell\nnpm install next-query\n```\n```shell\nyarn add next-query\n```\n\n## Usage\n\n### Basic\n\n```typescript\nimport useQuery from 'next-query';\n\nfunction Page() {\n  // Returns =\u003e { id: string | string[] };\n  const { id } = useQuery();\n  \n  ...\n}\n```\n\n### Typed\n\n```typescript\nimport useQuery from 'next-query';\n\nfunction Page() {\n  // Return Type =\u003e { id: string };\n  const { id } = useQuery\u003c{ id: string }\u003e();\n  \n  ...\n}\n```\n\n### Parsed\n\n```typescript\nimport useQuery from 'next-query';\n\nfunction Page() {\n  // Return Type =\u003e { id: number };\n  const { id } = useQuery({ id: Number });\n  \n  ...\n}\n```\n\nSee Supported Parse Types for more\n\n### Arrays\n\n```typescript\nimport useQuery from 'next-query';\n\nfunction Page() {\n  // Return Type =\u003e { ids: number[] };\n  const { ids } = useQuery({ ids: [Number] });\n  \n  ...\n}\n```\n\n### Complex\n\n```typescript\nimport useQuery from 'next-query';\n\nfunction Page() {\n  // Return Type =\u003e { id: number, selected: boolean };\n  const { ids, selected } = useQuery({ id: Number, selected: Boolean }); \n  \n  ...\n}\n```\n\n## API\n\n### Supported Parse Types\n\n```typescript\nString | Boolean | Number\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackall3n%2Fnext-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackall3n%2Fnext-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackall3n%2Fnext-query/lists"}