@blackbox-vision/react-native-storage
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

RN Storage License: MIT

This package let us use MMKV Storage to persist information in a secure and performant way.

Install

You can install this library via NPM or YARN.

NPM

npm i @blackbox-vision/react-native-storage

YARN

yarn add @blackbox-vision/react-native-storage

Use case

This library let us persist information in a faster and secure way.

Usage

Storage

Storage API let you persist information that is not sensitive in a faster way.

import { Storage } from "@blackbox-vision/react-native-storage";

const persistNonSensitiveUserInformation = async (nonSensitiveInformation) => {
  await Storage.setItem("@app_name/non_sensitive", nonSensitiveInformation);
};

const getNonSensitiveUserInformation = async () => {
  return await Storage.getItem("@app_name/non_sensitive");
};

SecureStorage

SecureStorage API let you persist information that is sensitive in a secure and faster way.

import { SecureStorage } from "@blackbox-vision/react-native-storage";

const persistSensitiveUserInformation = async (sensitiveInformation) => {
  await SecureStorage.setItem("@app_name/sensitive", sensitiveInformation);
};

const getSensitiveUserInformation = async () => {
  return await SecureStorage.getItem("@app_name/sensitive");
};

Issues

Please, open an issue following one of the issues templates. We will do our best to fix them.

Contributing

If you want to contribute to this project see contributing for more information.

License

Distributed under the MIT license. See LICENSE for more information.

Readme

Keywords

none

Package Sidebar

Install

npm i @blackbox-vision/react-native-storage

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

33.5 kB

Total Files

14

Last publish

Collaborators

  • jonatansalas
  • manutuero