{"adoption": {"forks": 43, "observed_at": "2026-08-28T04:04:04.199518+00:00", "stars": 1231}, "canonical_url": "https://ross.abutalabs.com/products/use-local-storage-state", "card": {"archived": false, "artifact_type": "library", "description": "React hook that persists data in localStorage", "domain": ["frontend", "web-development"], "enriched": true, "function": ["state-management", "ui-components"], "health_score": 96, "homepage": null, "language": "TypeScript", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["astoilkov/use-local-storage-state"], "name": "astoilkov/use-local-storage-state", "platform": ["browser"], "pushed_at": "2026-07-16T11:22:25+00:00", "repo": "astoilkov/use-local-storage-state", "stars": 1231, "tags": ["react-hook", "localstorage", "persistence", "ssr", "cross-tab-sync", "nodejs"], "topics": ["hook", "localstorage", "persistent", "react", "usestate"], "urls": [], "use_cases": ["persist react state across page reloads", "sync state between browser tabs", "replace useState with localStorage-backed state", "store todos or user preferences in localStorage", "handle localStorage unavailability gracefully in react apps", "ssr-safe localStorage state in next.js"], "what_it_is": "A React hook that persists component state in localStorage, acting as a drop-in replacement for useState. It supports SSR, cross-tab synchronization via the storage event, and an in-memory fallback when localStorage is unavailable.", "when_to_avoid": ["you need persistence beyond the browser (server-side or native)", "you need to store large or complex data structures", "your project is not React-based"], "when_to_choose": ["you need a tiny, production-ready React hook for persistent state", "you want cross-tab/window state synchronization", "you need SSR compatibility and React 18/19 concurrent rendering support"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/use-local-storage-state", "repo": "astoilkov/use-local-storage-state", "role": "main", "score": 90}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:04:04.199518+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T08:22:25.210983+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "5fced20f448d88ff2d7033f4ba6d1e3909f4b2aa68eb938094c01f6f8020655e", "fetched_at": "2026-08-28T04:04:04.199518+00:00", "kind": "readme", "missing": false, "url": "https://github.com/astoilkov/use-local-storage-state"}, {"content_hash": "87c97a22b2a1173a8572ec7ce0a5547fcd5390c3d94ffda6a4df1131cbf69d8e", "fetched_at": "2026-08-29T12:21:59.648855+00:00", "kind": "registry_npm", "missing": false, "url": "https://registry.npmjs.org/use-local-storage-state"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 92, "longevity": 100, "rhythm": 81}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 2365, "days_push": 48, "days_rel": 48, "gap_med": 34, "n_releases_24m": 4}, "score": 90, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}