{"id":19273594,"url":"https://github.com/zikwall/use-localforage","last_synced_at":"2025-04-21T22:33:03.555Z","repository":{"id":55087863,"uuid":"328638726","full_name":"zikwall/use-localforage","owner":"zikwall","description":"React Hook for localForage - improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL) with a simple, localStorage-like API","archived":false,"fork":false,"pushed_at":"2021-01-12T09:03:01.000Z","size":81,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T16:24:05.499Z","etag":null,"topics":["hook","localforage","react","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zikwall.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-01-11T11:14:32.000Z","updated_at":"2022-10-17T07:24:52.000Z","dependencies_parsed_at":"2022-08-14T11:40:14.333Z","dependency_job_id":null,"html_url":"https://github.com/zikwall/use-localforage","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/zikwall%2Fuse-localforage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fuse-localforage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fuse-localforage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikwall%2Fuse-localforage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikwall","download_url":"https://codeload.github.com/zikwall/use-localforage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250144976,"owners_count":21382329,"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":["hook","localforage","react","typescript"],"created_at":"2024-11-09T20:43:34.317Z","updated_at":"2025-04-21T22:32:58.544Z","avatar_url":"https://github.com/zikwall.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![version](https://img.shields.io/npm/v/@zikwall/use-localforage)](https://www.npmjs.com/package/@zikwall/use-localforage)\n[![tests](https://github.com/zikwall/use-localforage/workflows/tests/badge.svg)](https://github.com/zikwall/use-localforage/actions)\n[![downloads](https://img.shields.io/npm/dw/@zikwall/use-localforage)](https://www.npmjs.com/package/@zikwall/use-localforage)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003euse localForage\u003c/h1\u003e\n  \u003ch5\u003elocalForage is a fast and simple storage library for JavaScript\u003c/h5\u003e\n\u003c/div\u003e\n\n### Installation\n\n- `$ yarn add @zikwall/use-localforage`\n\n### How to use\n\n```typescript jsx\nimport { useLocalForage } from \"@zikwall/use-localforage\";\n\ninterface User {\n    name: string;\n    lastname: string;\n    age: number;\n}\n\nfunction App() {\n    const [ userValue, setUserValue, removeUserValue ] = useLocalForage\u003cUser\u003e('user', {...});\n\n    let onUpdate = () =\u003e {\n        setUserValue({...});\n    };\n\n    let onRemove = () =\u003e {\n        removeUserValue();\n    };\n\n    return (\n        \u003cdiv className=\"example component\"\u003e\n            \u003cbutton onClick={onUpdate}\u003eClick for update user properties\u003c/button\u003e\n            \u003cbutton onClick={onRemove}\u003eClick for remove user properties\u003c/button\u003e\n\n            \u003cp\u003eName is: {userValue?.name}\u003c/p\u003e\n            \u003cp\u003eLastname is: {userValue?.lastname}\u003c/p\u003e\n            \u003cp\u003eAge is: {userValue?.age}\u003c/p\u003e\n        \u003c/div\u003e\n    );\n}\n```\n\n### Tests\n\n- `$ yarn test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fuse-localforage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikwall%2Fuse-localforage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikwall%2Fuse-localforage/lists"}