MCPcopy Index your code
hub / github.com/callstack/async-storage

github.com/callstack/async-storage @v2.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.3 ↗ · + Follow
1 symbols 4 edges 8 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Version Build Status

@callstack/async-storage

Cross platform local storage with React Native - like API.

Check out working web example 💻 and mobile 📱

In order to use it, just import from either web or native:

import AsyncStorage from '@callstack/async-storage';

and call any of the methods available here. The API is 100% compatible, including the errors that can be thrown.

AsyncStorage.setItem('key', 'value')
  .then(() => {})
  .catch(() => {})

~Warning: Unlike React Native AsyncStorage, this module doesn't accept callbacks. If you are already using Promises or async/await, this warning can be ignored.~

Sice the version 1.1.0 we do support callbacks (along with promises) for methods setItem, getItem, removeItem and getAllKeys. That's mean that this library now plays well with e.g. redux-persist. :rocket:

Core symbols most depended-on inside this repo

createLocalStorage
called by 1
jest/setup.js

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

jest/setup.js1 symbols

For agents

$ claude mcp add async-storage \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact