{"id":18774191,"url":"https://github.com/leny/react-use-storage","last_synced_at":"2025-04-13T09:21:28.448Z","repository":{"id":37693005,"uuid":"173577428","full_name":"leny/react-use-storage","owner":"leny","description":"React Hook to handle local and session storage","archived":false,"fork":false,"pushed_at":"2023-03-04T03:15:42.000Z","size":1534,"stargazers_count":20,"open_issues_count":18,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T00:54:56.507Z","etag":null,"topics":["react","react-hooks"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-03T13:19:45.000Z","updated_at":"2025-01-22T13:35:03.000Z","dependencies_parsed_at":"2024-06-18T21:11:59.964Z","dependency_job_id":"e9753472-f830-4828-96db-ba1a61ee948b","html_url":"https://github.com/leny/react-use-storage","commit_stats":{"total_commits":249,"total_committers":4,"mean_commits":62.25,"dds":"0.12851405622489964","last_synced_commit":"317913a94c58c484a80e52adb1ac43d6ebd949f8"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Freact-use-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Freact-use-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Freact-use-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Freact-use-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leny","download_url":"https://codeload.github.com/leny/react-use-storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248689375,"owners_count":21145923,"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":["react","react-hooks"],"created_at":"2024-11-07T19:37:42.265Z","updated_at":"2025-04-13T09:21:28.414Z","avatar_url":"https://github.com/leny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-use-storage\n\n\u003e [React Hook](https://reactjs.org/docs/hooks-intro.html) to handle local and session storage\n\n* * *\n\n## Install\n\n\tnpm install --save react-use-storage\n\n## Usage\n\nSee this hooks as a *useState* hooks that syncs with **local/session storage**.\n\n\u003e ☝️ **NOTE:** if the value of the key in the storage change from another portion of your code, the hook keep it in sync and re-render your component with the new value.\n\n### LocalStorage\n\n```javascript\n\timport {useLocalStorage} from \"react-use-storage\";\n\n\t// ...\n\t\tconst [value, setValue, removeValue] = useLocalStorage(\"key\", \"default value\");\n\n```\n\n### SessionStorage\n\n```javascript\n\timport {useSessionStorage} from \"react-use-storage\";\n\n\t// ...\n\t\tconst [value, setValue, removeValue] = useSessionStorage(\"key\", \"default value\");\n\n```\n\n## License\n\n[UNLICENSED (public domain)](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Freact-use-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleny%2Freact-use-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Freact-use-storage/lists"}