{"id":23039148,"url":"https://github.com/shop3/react-cpls","last_synced_at":"2026-05-09T01:02:20.049Z","repository":{"id":48136735,"uuid":"493213525","full_name":"shop3/react-cpls","owner":"shop3","description":"React cross page local storage","archived":false,"fork":false,"pushed_at":"2023-03-02T23:19:09.000Z","size":1580,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T14:12:46.093Z","etag":null,"topics":["localstorage","react"],"latest_commit_sha":null,"homepage":null,"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/shop3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-05-17T11:04:03.000Z","updated_at":"2022-07-18T08:46:12.000Z","dependencies_parsed_at":"2024-12-15T18:40:13.802Z","dependency_job_id":null,"html_url":"https://github.com/shop3/react-cpls","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shop3%2Freact-cpls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shop3%2Freact-cpls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shop3%2Freact-cpls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shop3%2Freact-cpls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shop3","download_url":"https://codeload.github.com/shop3/react-cpls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911489,"owners_count":20853654,"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":["localstorage","react"],"created_at":"2024-12-15T18:28:20.819Z","updated_at":"2026-05-09T01:02:15.024Z","avatar_url":"https://github.com/shop3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Cross Page Local Storage\n\nReact provider to simplify localStorage usage, when the storage is updated the new value is reflected across the whole application and on other opened pages.\n\n## Installation\n\n```bash\nnpm install --save @shop3/react-cpls\n```\n\n## Usage\n\n```js\nimport React, { useEffect } from 'react';\nimport { StorageProvider, useStorage } from '@shop3/react-cpls';\n\nconst App = () =\u003e {\n  return (\n    \u003cStorageProvider\u003e\n      {/* app here */}\n    \u003c/StorageProvider\u003e\n  )\n}\n\nconst Example = () =\u003e {\n  const storage = useStorage();\n\n  useEffect(() =\u003e {\n    storage.setItem('test', 'test value');\n  }, [storage]);\n\n  return (\n    \u003cp\u003e{storage.getItem('test')}\u003c/p\u003e\n  )\n}\n```\n\n## Example\n\n![Screen recording demostration](https://github.com/shop3/react-cpls/blob/main/assets/react-cpls-screen-recording.gif)\n\n# Development\n\n## Installation\n\n```bash\nnpm install\n\nnpm run husky:install\n```\n\n## Development\n\n```bash\nnpm run develop\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshop3%2Freact-cpls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshop3%2Freact-cpls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshop3%2Freact-cpls/lists"}