Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

AsyncStorage as localStorage alternative on mobile #48

Open

Description

@sanjarcode

AsyncStorage lib behavior is almost completely like window.localStorage, except:

  1. Is async. most such solutions are async. Not a problem, but is a complicated solution if all you want is a cookies alternative.
  2. crashes (instead of return null) when you try to store a non-empty value.
  3. Cannot store '', number, boolean, null, undefined. A simple wrapper fixes this.
  4. Works for Android, ios
  5. Default size limit 6MB, resizable through option

cred: 620k stars
npm: https://www.npmjs.com/package/@react-native-async-storage/async-storage
docs: https://react-native-async-storage.github.io/async-storage/

Activity

  1. self-assigned this
    on Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions