{"id":21667141,"url":"https://github.com/space-fe/react-use-querystring-state","last_synced_at":"2025-03-20T06:48:40.473Z","repository":{"id":43981436,"uuid":"240635992","full_name":"space-fe/react-use-querystring-state","owner":"space-fe","description":"Mapping query string from url to Component state seamlessly","archived":false,"fork":false,"pushed_at":"2023-03-03T14:01:58.000Z","size":457,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T12:19:07.124Z","etag":null,"topics":["qs","querystring","reacthooks","usestate"],"latest_commit_sha":null,"homepage":"","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/space-fe.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":"2020-02-15T03:02:04.000Z","updated_at":"2023-10-02T01:24:57.000Z","dependencies_parsed_at":"2025-01-25T08:33:53.149Z","dependency_job_id":null,"html_url":"https://github.com/space-fe/react-use-querystring-state","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-fe%2Freact-use-querystring-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-fe%2Freact-use-querystring-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-fe%2Freact-use-querystring-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-fe%2Freact-use-querystring-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-fe","download_url":"https://codeload.github.com/space-fe/react-use-querystring-state/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244228853,"owners_count":20419512,"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":["qs","querystring","reacthooks","usestate"],"created_at":"2024-11-25T11:33:59.844Z","updated_at":"2025-03-20T06:48:40.454Z","avatar_url":"https://github.com/space-fe.png","language":"TypeScript","readme":"# react-use-querystring-state\n\nMapping query string from url to Component state seamlessly, You can migrate from React `useState` to `useQueryStringState` at no cost.\n[react-use-querystring-state](https://github.com/space-fe/react-use-querystring-state)\n\n## Installation\n\nUse `npm`\n```shell\nnpm install react-use-querystring-state\n```\n\n## Usage\n\nYou can save a state such as string, object and any  JSON stringify value.\n\n### string\n\n```javascript\nimport React, { useState } from 'react'\nimport useQueryStringState from 'react-use-querystring-state'\n\n// useState\n//\n// const [key1State, setKey1State] = useState('keyword')\n\nconst [key1State, setKey1State] = useQueryStringState('key1', 'keyword')\n```\n\n### object\n\n```javascript\nimport React, { useState } from 'react'\nimport useQueryStringState from 'react-use-querystring-state'\n\n// useState\n//\n// const [key2State, setKey2State] = useState({ a: '1', b: '2' })\n\n\nconst [key1State, setKey1State] = useQueryStringState('key2', { a: '1', b: '2' })\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-fe%2Freact-use-querystring-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-fe%2Freact-use-querystring-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-fe%2Freact-use-querystring-state/lists"}