{"id":16990835,"url":"https://github.com/blenderskool/react-localstorage-hooks","last_synced_at":"2025-04-12T03:31:45.199Z","repository":{"id":48787470,"uuid":"380674969","full_name":"blenderskool/react-localstorage-hooks","owner":"blenderskool","description":"🔄 A collection of React hooks for reactively managing localStorage.","archived":false,"fork":false,"pushed_at":"2022-10-29T13:05:08.000Z","size":81,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-26T12:22:27.976Z","etag":null,"topics":["cross-tab","hooks","library","localstorage","react","reactjs","sync","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blenderskool.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}},"created_at":"2021-06-27T07:10:16.000Z","updated_at":"2024-02-29T17:30:44.000Z","dependencies_parsed_at":"2023-01-20T13:17:13.320Z","dependency_job_id":null,"html_url":"https://github.com/blenderskool/react-localstorage-hooks","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Freact-localstorage-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Freact-localstorage-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Freact-localstorage-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Freact-localstorage-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blenderskool","download_url":"https://codeload.github.com/blenderskool/react-localstorage-hooks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512745,"owners_count":21116674,"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":["cross-tab","hooks","library","localstorage","react","reactjs","sync","typescript"],"created_at":"2024-10-14T03:23:53.166Z","updated_at":"2025-04-12T03:31:44.894Z","avatar_url":"https://github.com/blenderskool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    react-localstorage-hooks\n  \u003c/h1\u003e\n  \u003cp\u003e\n    A collection of React hooks for reactively managing \u003ccode\u003elocalStorage\u003c/code\u003e.\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"https://www.npmjs.com/package/react-localstorage-hooks\"\u003e\n      \u003cimg src=\"https://badgen.net/npm/v/react-localstorage-hooks\" /\u003e\n    \u003c/a\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/min/react-localstorage-hooks\" /\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/minzip/react-localstorage-hooks?label=gzipped%20size\" /\u003e\n    \u003cimg src=\"https://badgen.net/npm/types/react-localstorage-hooks\" /\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/tree-shaking/react-localstorage-hooks\" /\u003e\n  \u003c/p\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n\n\n### Installation\n\u003cpre\u003e\nnpm i \u003ca href=\"https://www.npmjs.com/package/react-localstorage-hooks\"\u003ereact-localstorage-hooks\u003c/a\u003e\n\u003c/pre\u003e\n\n\n### Documentation\n- [`useLocalStorageState`](./src/useLocalStorageState/): creates reactive state variables synced with localStorage.\n- [`useLocalStorageReducer`](./src/useLocalStorageReducer/): similar to [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer) but abstracted on top of localStorage.\n- [`useLocalStorageSelector`](./src/useLocalStorageSelector/): hook to select some data from localStorage that automatically updates when selected data changes.\n- [`createLocalStorageDispatch`](./src/createLocalStorageDispatch/): creates a dispatch method that directly updates localStorage.\n\n### Usage\n- Make sure your project is using React 16.18.0 or above.\n\n- Install the package using `npm` or `yarn`  \n  ```bash\n  npm i react-localstorage-hooks\n  ```\n\n- Import the hooks either using ES6 named imports:  \n  ```js\n  import { useLocalStorageState } from 'react-localstorage-hooks';\n  ```  \n  or importing each hook directly from `lib`:\n  ```js\n  import useLocalStorageState from 'react-localstorage-hooks/lib/useLocalStorageState/useLocalStorageState';\n  ```\n  \n### License\nThis package is licensed under [MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblenderskool%2Freact-localstorage-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblenderskool%2Freact-localstorage-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblenderskool%2Freact-localstorage-hooks/lists"}