{"id":23186088,"url":"https://github.com/termosa/create-global-state-hook","last_synced_at":"2025-06-17T00:35:15.950Z","repository":{"id":57140858,"uuid":"398820103","full_name":"termosa/create-global-state-hook","owner":"termosa","description":"Creates a hook like useState but all instances will have a single shared storage","archived":false,"fork":false,"pushed_at":"2021-08-22T14:29:53.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T12:47:27.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/termosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-22T14:29:24.000Z","updated_at":"2021-08-22T14:29:56.000Z","dependencies_parsed_at":"2022-09-01T23:51:24.006Z","dependency_job_id":null,"html_url":"https://github.com/termosa/create-global-state-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/termosa/create-global-state-hook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/termosa%2Fcreate-global-state-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/termosa%2Fcreate-global-state-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/termosa%2Fcreate-global-state-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/termosa%2Fcreate-global-state-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/termosa","download_url":"https://codeload.github.com/termosa/create-global-state-hook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/termosa%2Fcreate-global-state-hook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260268632,"owners_count":22983601,"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-12-18T10:14:35.326Z","updated_at":"2025-06-17T00:35:15.928Z","avatar_url":"https://github.com/termosa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crete-global-state-hook\n\nCreates a hook like useState but all instances will have a single shared storage\n\n## Example\n\n```js\nimport creteGlobalStateHook from 'crete-global-state-hook'\n\nconst useGlobalCounter = createGlobalStateHook(0)\n\nexport default function GlobalCounter() {\n    const [count, setCount] = useGlobalCounter()\n    return (\n        \u003cdiv\u003e\n            \u003cinput type=\"button\" value=\"-\" onClick={() =\u003e setCount(count - 1)} /\u003e\n            {count}\n            \u003cinput type=\"button\" value=\"+\" onClick={() =\u003e setCount(count + 1)} /\u003e\n        \u003c/div\u003e\n    )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftermosa%2Fcreate-global-state-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftermosa%2Fcreate-global-state-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftermosa%2Fcreate-global-state-hook/lists"}