{"id":13429525,"url":"https://github.com/rehooks/local-storage","last_synced_at":"2026-01-16T06:49:07.418Z","repository":{"id":33211687,"uuid":"154739367","full_name":"rehooks/local-storage","owner":"rehooks","description":"React hook which syncs localStorage[key] with the comp.","archived":false,"fork":false,"pushed_at":"2023-08-23T17:19:55.000Z","size":2262,"stargazers_count":579,"open_issues_count":8,"forks_count":47,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-19T19:58:19.691Z","etag":null,"topics":["hooks","localstorage","react"],"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/rehooks.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}},"created_at":"2018-10-25T21:22:47.000Z","updated_at":"2025-09-08T06:22:28.000Z","dependencies_parsed_at":"2024-01-07T18:04:22.149Z","dependency_job_id":"0e7e3583-f1ae-4950-8f24-dc6a702ce3f6","html_url":"https://github.com/rehooks/local-storage","commit_stats":{"total_commits":91,"total_committers":18,"mean_commits":5.055555555555555,"dds":0.5714285714285714,"last_synced_commit":"9f4cf8b1f6c446f62a0b747a2a772206d1cd5141"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/rehooks/local-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Flocal-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Flocal-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Flocal-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Flocal-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rehooks","download_url":"https://codeload.github.com/rehooks/local-storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehooks%2Flocal-storage/sbom","scorecard":{"id":769237,"data":{"date":"2025-08-18","repo":{"name":"github.com/rehooks/local-storage","commit":"3a7784e5537b63dbc2a864f237123d6fcc22ac7f"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 10/26 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Warn: no topLevel permission defined: .github/workflows/npmpublish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/rehooks/local-storage/npmpublish.yml/master?enable=pin","Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:6: pin your Docker image by updating node:12 to node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:7","Warn: npmCommand not pinned by hash: .devcontainer/Dockerfile:20-54","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   5 out of   6 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"66 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-xq7p-g2vc-g82p","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-cpq7-6gpm-g9rc","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-95m3-7q98-8xr5","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T01:46:34.658Z","repository_id":33211687,"created_at":"2025-08-23T01:46:34.659Z","updated_at":"2025-08-23T01:46:34.659Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hooks","localstorage","react"],"created_at":"2024-07-31T02:00:41.249Z","updated_at":"2026-01-16T06:49:07.394Z","avatar_url":"https://github.com/rehooks.png","language":"TypeScript","readme":"# @rehooks/local-storage\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n\u003e React hook for enabling synchronization with local-storage.\n\n[![npm version](https://badge.fury.io/js/%40rehooks%2Flocal-storage.svg)](https://www.npmjs.com/package/@rehooks/local-storage)\n[![npm downloads](https://img.shields.io/npm/dw/@rehooks/local-storage)](https://www.npmjs.com/package/@rehooks/local-storage)\n\nAPI Docs can be found [here](https://rehooks.github.io/local-storage).\n\n## Table of Contents\n\n- [@rehooks/local-storage](#rehookslocal-storage)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Install](#install)\n    - [With Yarn](#with-yarn)\n    - [With NPM](#with-npm)\n  - [Usage](#usage)\n    - [Write to Storage](#write-to-storage)\n    - [Read From Storage](#read-from-storage)\n      - [Optionally use a default value](#optionally-use-a-default-value)\n    - [Delete From Storage](#delete-from-storage)\n    - [Using With Context](#using-with-context)\n  - [Full Example](#full-example)\n  - [Contributors ✨](#contributors-)\n\n## Features\n\n- Automatic JSON serialization\n- Synchronization across multiple tabs\n- Provides functions for updating the localStorage and triggering a state update outside of the component\n- Type hinting via TypeScript\n\n## Install\n\n### With Yarn\n\n```sh\nyarn add @rehooks/local-storage\n```\n\n### With NPM\n\n```sh\nnpm i @rehooks/local-storage --save\n```\n\n## Usage\n\n### Write to Storage\n\nThis can be anywhere from within your application.\n\n\u003e Note: Objects that are passed to writeStorage are automatically stringified.\n\u003e This will not work for circular structures.\n\n```jsx\nimport React from 'react';\nimport { writeStorage } from '@rehooks/local-storage';\n\nlet counter = 0;\n\nconst MyButton = () =\u003e (\n  \u003cbutton onClick={_ =\u003e writeStorage('i', ++counter)}\u003e\n    Click Me\n  \u003c/button\u003e\n);\n\n```\n\n### Read From Storage\n\nThis component will receive updates to itself from local storage.\n\n__Javascript__:\n\n```jsx\nimport React from 'react';\nimport { useLocalStorage } from '@rehooks/local-storage';\n\nfunction MyComponent() {\n  const [counterValue] = useLocalStorage('i'); // send the key to be tracked.\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003e{counterValue}\u003c/h1\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n__Typescript__:\n\n```tsx\nimport React from 'react';\nimport { useLocalStorage } from '@rehooks/local-storage';\n\nfunction MyComponent() {\n  const [counterValue] = useLocalStorage\u003cnumber\u003e('i'); // specify a type argument for your type\n  // Note: Since there was no default value provided, this is potentially null.\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003e{counterValue}\u003c/h1\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n#### Optionally use a default value\n\n\u003e Note: Objects that are passed to useLocalStorage's default parameter will be automatically\n\u003e stringified. This will not work for circular structures.\n\n```jsx\nimport React from 'react';\nimport { useLocalStorage } from '@rehooks/local-storage';\n\nfunction MyComponent() {\n  // Note: The type of user can be inferred from the default value type\n  const [user] = useLocalStorage('user', { name: 'Anakin Skywalker' });\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003e{user.name}\u003c/h1\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n### Delete From Storage\n\nYou may also delete items from the local storage as well.\n\n```js\nimport { writeStorage, deleteFromStorage } from '@rehooks/local-storage';\n\nwriteStorage('name', 'Homer Simpson'); // Add an item first\n\ndeleteFromStorage('name'); // Deletes the item\n\nconst thisIsNull = localStorage.getItem('name'); // This is indeed null\n```\n\n### Using With Context\n\nIt is advisable to use this hook with context if you want to have a properly \nsynchronized default value. Using `useLocalStorage` in two different components\nwith the same key but different default values can lead to unexpected behaviour.\n\nUsing Context will also prevent components from rendering and setting \ndefault values to the localStorage when you just want them to be deleted from localStorage\n(assuming the context provider also does not re-render).\n\n```jsx\nimport React, { createContext, useContext } from 'react';\nimport { useLocalStorage } from '@rehooks/local-storage';\n\nconst defaultProfile = { name: 'Spongekebob' };\nconst defaultContextValue = [defaultProfile, () =\u003e {}, () =\u003e {}];\n\nconst ProfileContext = createContext(defaultContextValue);\n\nexport const ProfileProvider = ({ children }) =\u003e {\n  const ctxValue = useLocalStorage('profile', defaultProfile);\n  return (\n    \u003cProfileContext.Provider value={ctxValue}\u003e\n      {children}\n    \u003c/ProfileContext.Provider\u003e\n  );\n};\n\nconst useProfile = () =\u003e useContext(ProfileContext);\n\nconst App = () =\u003e {\n  const [profile] = useProfile();\n  return \u003ch1\u003e{profile \u0026\u0026 profile.name}\u003c/h1\u003e;\n};\n\nexport default () =\u003e {\n  return (\n    \u003cProfileProvider\u003e\n      \u003cApp /\u003e\n    \u003c/ProfileProvider\u003e\n  );\n};\n```\n\n## Full Example\n\nYou may view this example [here on StackBlitz.](https://stackblitz.com/edit/react-vbrkjb?embed=1\u0026file=index.js)\n\n\u003e Note: The writeStorage and deleteFromStorage functions are provided from useLocalStorage as well,\n\u003e and do not require you to specify the key when using them.\n\n```jsx\nimport React, { Fragment } from 'react';\nimport { render } from 'react-dom';\nimport { writeStorage, deleteFromStorage, useLocalStorage } from '@rehooks/local-storage';\n\nconst startingNum = 0;\n\nconst Clicker = () =\u003e (\n  \u003cFragment\u003e\n    \u003ch4\u003eClicker\u003c/h4\u003e\n    \u003cbutton onClick={_ =\u003e {\n      writeStorage('num', localStorage.getItem('num')\n      ? +(localStorage.getItem('num')) + 1\n      : startingNum\n      )\n    }}\u003e\n      Increment From Outside\n    \u003c/button\u003e\n    \u003cbutton onClick={_ =\u003e deleteFromStorage('num')}\u003e\n      Delete From Outside\n    \u003c/button\u003e\n  \u003c/Fragment\u003e\n);\n\nconst IncrememterWithButtons = () =\u003e {\n  const [number, setNum, deleteNum] = useLocalStorage('num');\n\n  return (\n    \u003cFragment\u003e\n      \u003cp\u003e{typeof(number) === 'number' ? number : 'Try incrementing the number!'}\u003c/p\u003e\n      \u003cbutton onClick={_ =\u003e setNum(number !== null ? +(number) + 1 : startingNum)}\u003eIncrement\u003c/button\u003e\n      \u003cbutton onClick={deleteNum}\u003eDelete\u003c/button\u003e\n    \u003c/Fragment\u003e\n  );\n};\n\nconst App = () =\u003e (\n  \u003cFragment\u003e\n    \u003ch1\u003e Demo \u003c/h1\u003e\n    \u003cIncrememterWithButtons /\u003e\n    \u003cClicker /\u003e\n  \u003c/Fragment\u003e\n);\n\n// Assuming there is a div in index.html with an ID of 'root'\nrender(\u003cApp /\u003e, document.getElementById('root'));\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://solankiamit.com\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/3483526?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAmit Solanki\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=iamsolankiamit\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=iamsolankiamit\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-iamsolankiamit\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/pulls?q=is%3Apr+reviewed-by%3Aiamsolankiamit\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://jharrilim.github.io/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/19535809?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJoe\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=jharrilim\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#example-jharrilim\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#ideas-jharrilim\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-jharrilim\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/pulls?q=is%3Apr+reviewed-by%3Ajharrilim\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=jharrilim\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/fatihky\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/4169772?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFatih Kaya\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=fatihky\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=fatihky\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/issues?q=author%3Afatihky\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://hübenthal.no\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/404102?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJarl André Hübenthal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=jarlah\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=jarlah\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/issues?q=author%3Ajarlah\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://jamie.build/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/952783?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJamie Kyle\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=jamiebuilds\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://devalbo.blogspot.com/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/1653890?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlbert Boehmler\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=devalbo\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/issues?q=author%3Adevalbo\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/gmdayley\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/647130?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGabriel Dayley\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/rehooks/local-storage/commits?author=gmdayley\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/issues?q=author%3Agmdayley\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mayteio\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/43975092?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHarley Alexander\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-mayteio\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=mayteio\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/issues?q=author%3Amayteio\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/rehooks/local-storage/commits?author=mayteio\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["Packages","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehooks%2Flocal-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frehooks%2Flocal-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehooks%2Flocal-storage/lists"}