{"id":16125225,"url":"https://github.com/bdbch/react-basic-hooks","last_synced_at":"2025-04-06T12:30:17.948Z","repository":{"id":42718252,"uuid":"288766428","full_name":"bdbch/react-basic-hooks","owner":"bdbch","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-21T15:29:01.000Z","size":173,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T18:21:21.859Z","etag":null,"topics":[],"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/bdbch.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":"2020-08-19T15:18:44.000Z","updated_at":"2023-04-21T15:28:39.000Z","dependencies_parsed_at":"2022-08-23T08:30:24.288Z","dependency_job_id":null,"html_url":"https://github.com/bdbch/react-basic-hooks","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/bdbch%2Freact-basic-hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbch%2Freact-basic-hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbch%2Freact-basic-hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdbch%2Freact-basic-hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdbch","download_url":"https://codeload.github.com/bdbch/react-basic-hooks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247483481,"owners_count":20946229,"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":[],"created_at":"2024-10-09T21:26:30.738Z","updated_at":"2025-04-06T12:30:17.876Z","avatar_url":"https://github.com/bdbch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@d2k/react-localstorage`\n\n\u003e React hooks for easy and simple localstorage access\n\n\u003e You'll need to install `react`, `react-dom`, etc at `^16.8.4`\n\n## Install\n\n```sh\nnpm i @d2k/react-localstorage --save\n```\n\n## Usage\n\nReact Localstorage gives you simple hooks to work with your localstorage. Here is some example code:\n\n```jsx\nimport React from 'react\nimport useLocalStorage from '@d2k/react-localstorage'\n\nconst App = () =\u003e {\n  const [firstName, setFirstName, removeFirstName] = useLocalStorage('firstName', 'John')\n  const [lastName, setLastName, removeLastName] = useLocalStorage('lastName', 'Doe')\n\n  // You can update localStorage data via setFirstName('John') or removeFirstName()\n\n  return (\n    \u003ch1\u003eDemo\u003c/h1\u003e\n    { firstName \u0026\u0026 lastName \u0026\u0026 (\n      \u003cp\u003e\n        Hello {firstName} {lastName}\n      \u003c/p\u003e\n    )}\n  )\n}\n```\n\nUse `.set` or `.remove` to update data from your component.\n\nAll storage updates will be automatically synced with all components using the same localStorage value key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdbch%2Freact-basic-hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdbch%2Freact-basic-hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdbch%2Freact-basic-hooks/lists"}