{"id":13481403,"url":"https://github.com/tkh44/react-localforage","last_synced_at":"2025-03-22T00:32:03.884Z","repository":{"id":57334120,"uuid":"100742142","full_name":"tkh44/react-localforage","owner":"tkh44","description":"👨‍🌾 Declarative localForage in React","archived":false,"fork":false,"pushed_at":"2017-08-27T17:19:17.000Z","size":20,"stargazers_count":54,"open_issues_count":2,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T07:50:02.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tkh44.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-18T19:01:29.000Z","updated_at":"2024-05-27T15:49:14.000Z","dependencies_parsed_at":"2022-08-30T21:50:32.181Z","dependency_job_id":null,"html_url":"https://github.com/tkh44/react-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/tkh44%2Freact-localforage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkh44%2Freact-localforage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkh44%2Freact-localforage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkh44%2Freact-localforage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkh44","download_url":"https://codeload.github.com/tkh44/react-localforage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221820830,"owners_count":16886225,"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-07-31T17:00:51.524Z","updated_at":"2024-10-28T11:24:54.858Z","avatar_url":"https://github.com/tkh44.png","language":"JavaScript","funding_links":[],"categories":["Components"],"sub_categories":["Data"],"readme":"\n\n# react-localforage\nDeclarative [localForage](https://github.com/localForage/localForage) in React\n\n[![npm version](https://badge.fury.io/js/react-localforage.svg)](https://badge.fury.io/js/react-localforage)\n[![Build Status](https://travis-ci.org/tkh44/react-localforage.svg?branch=master)](https://travis-ci.org/tkh44/react-localforage)\n[![codecov](https://codecov.io/gh/tkh44/react-localforage/branch/master/graph/badge.svg)](https://codecov.io/gh/tkh44/react-localforage)\n\n-   [Install](#install)\n-   [Forage.GetItem](#foragegetitem)\n-   [Forage.SetItem](#foragesetitem)\n\n## Install\n\n```bash\nnpm install -S react-localforage\n```\n\n```javascript\nimport Forage from 'react-localforage'\n```\n\n## API\n\n### `Forage.GetItem`\n\n```jsx\n\u003cForage.GetItem\n  itemKey='auth-token'\n  render={({inProgress, value, error}) =\u003e {\n    return (\n      \u003cdiv\u003e\n        {error \u0026\u0026\n        \u003cdiv\u003e\n          {error.message}\n        \u003c/div\u003e}\n        {inProgress \u0026\u0026 \u003cprogress/\u003e}\n        {value \u0026\u0026\n         \u003cpre\u003e{JSON.stringify(value, null, 2)}\u003c/pre\u003e}\n      \u003c/div\u003e\n    )\n  }}\n/\u003e\n```\n\n### `Forage.SetItem`\n\n```jsx\n\u003cForage.SetItem\n  itemKey='auth-token'\n  itemValue={authToken}\n  render={({inProgress, value, error}) =\u003e {\n    return (\n      \u003cdiv\u003e\n        {error \u0026\u0026\n        \u003cdiv\u003e\n          {error.message}\n        \u003c/div\u003e}\n        {inProgress \u0026\u0026 \u003cprogress/\u003e}\n        {value \u0026\u0026\n        \u003cdiv\u003e\n          {value}\n        \u003c/div\u003e}\n      \u003c/div\u003e\n    )\n  }}\n/\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkh44%2Freact-localforage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkh44%2Freact-localforage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkh44%2Freact-localforage/lists"}