{"id":13827011,"url":"https://github.com/rrudol/useCookie","last_synced_at":"2025-07-09T02:33:05.054Z","repository":{"id":122638272,"uuid":"161707334","full_name":"rrudol/useCookie","owner":"rrudol","description":"🍪 React Hook for Cookies based on js-cookie 🍪","archived":false,"fork":false,"pushed_at":"2023-03-29T21:53:04.000Z","size":7,"stargazers_count":33,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-24T02:40:31.758Z","etag":null,"topics":["cookie","react","react-hooks"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@use-hook/use-cookie","language":"JavaScript","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/rrudol.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}},"created_at":"2018-12-13T23:36:03.000Z","updated_at":"2024-01-06T20:00:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7397b4e-4cca-4291-afdb-7975f2ca4a4a","html_url":"https://github.com/rrudol/useCookie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rrudol/useCookie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrudol%2FuseCookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrudol%2FuseCookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrudol%2FuseCookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrudol%2FuseCookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrudol","download_url":"https://codeload.github.com/rrudol/useCookie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrudol%2FuseCookie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262261655,"owners_count":23283895,"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":["cookie","react","react-hooks"],"created_at":"2024-08-04T09:01:48.402Z","updated_at":"2025-07-09T02:33:04.800Z","avatar_url":"https://github.com/rrudol.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# useCookie - React Hook\n\nReact Hook for Cookies based on [js-cookie](https://github.com/js-cookie/js-cookie)\n\n## Instalation\n\n```sh\nnpm install @use-hook/use-cookie --save\n```\n\n## Usage\n\n```javascript\nimport { useCookie } from \"@use-hook/use-cookie\";\n\nfunction App() {\n  const [name, setName] = useCookie(\"name\", \"Stefan\");\n\n  return (\n    \u003cdiv\u003e\n      \u003cinput\n        type=\"text\"\n        placeholder=\"Provide your name\"\n        value={name}\n        onChange={e =\u003e setName(e.target.value, { expires: 1 })}\n      /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n## Example\n- [https://codesandbox.io/s/5v8x67nw8l](https://codesandbox.io/s/5v8x67nw8l)\n\n## License\n\n[MIT](http://vjpr.mit-license.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrudol%2FuseCookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrudol%2FuseCookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrudol%2FuseCookie/lists"}