# react-native-asyncstorage

> A declarative AsyncStorage component for React Native

Latest version **1.0.0** (published 2017-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-asyncstorage
pnpm add react-native-asyncstorage
yarn add react-native-asyncstorage
bun add react-native-asyncstorage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-08-27 |
| First published | 2017-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Peter Piekarczyk |
| Maintainers | peterpme |
| Keywords | react, react-native, asyncstorage, declarative |

## Links

- npm: https://www.npmjs.com/package/react-native-asyncstorage
- Repository: https://github.com/peterpme/react-native-asyncstorage
- Homepage: https://github.com/peterpme/react-native-asyncstorage#readme
- Issues: https://github.com/peterpme/react-native-asyncstorage/issues
- npm.io page: https://npm.io/package/react-native-asyncstorage

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-08-27

## README

# react-native-asyncstorage

Declarative AsyncStorage component for React Native


- [Installation](#installation)
- [API](#api)
- [Usage Examples](#usage-examples)

## Installation

```zsh
yarn add react-native-asyncstorage
```

or

```zsh
npm install --save react-native-asyncstorage
```

## API

- AsyncStorage.GetItem
- AsyncStorage.SaveItem

## Usage Examples

Fetch apiToken from `AsyncStorage` before loading the rest of the app

```jsx
<AsyncStorage.GetItem
  itemKey='apiToken'
  render={({ loading, value, error }) => {

    if (loading) return <AppLoading />

    return (
      <Provider store={store}>
        <AppWithNavigationState />
      </Provider>
    )

  }}
/>

```

## Shoutout

Thanks to [@tkh44 for the idea and his localforage version](https://github.com/tkh44/react-localforage). He makes a lot of great shit, follow him on [Twitter](https://www.twitter.com/tkh44)

---
_Source: https://npm.io/package/react-native-asyncstorage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
