Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/tkh44/react-localforage

👨‍🌾 Declarative localForage in React
https://github.com/tkh44/react-localforage

Last synced: about 1 month ago
JSON representation

👨‍🌾 Declarative localForage in React

Lists

README

        

# react-localforage
Declarative [localForage](https://github.com/localForage/localForage) in React

[![npm version](https://badge.fury.io/js/react-localforage.svg)](https://badge.fury.io/js/react-localforage)
[![Build Status](https://travis-ci.org/tkh44/react-localforage.svg?branch=master)](https://travis-ci.org/tkh44/react-localforage)
[![codecov](https://codecov.io/gh/tkh44/react-localforage/branch/master/graph/badge.svg)](https://codecov.io/gh/tkh44/react-localforage)

- [Install](#install)
- [Forage.GetItem](#foragegetitem)
- [Forage.SetItem](#foragesetitem)

## Install

```bash
npm install -S react-localforage
```

```javascript
import Forage from 'react-localforage'
```

## API

### `Forage.GetItem`

```jsx
{
return (


{error &&

{error.message}
}
{inProgress && }
{value &&
{JSON.stringify(value, null, 2)}
}

)
}}
/>
```

### `Forage.SetItem`

```jsx
{
return (


{error &&

{error.message}
}
{inProgress && }
{value &&

{value}
}

)
}}
/>
```