@blackbox-vision/react-native-storage
v0.0.3
Published
Storage module
Downloads
5
Readme
RN Storage
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.