New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-session-storage

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-session-storage

Session Storage like module for React Native for session-bound storage.

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

react-native-session-storage

Session Storage like module for React Native for session-bound storage.

npm version npm bundle size License Android iOS Web GitHub issues

This module is NOT an alternative for Async Storage which is meant for persistent storage. Instead, this module provides a "volatile" session-bound storage which gets cleared when the app is re-opened.

Installation

With npm:

npm install react-native-session-storage

With yarn:

yarn add react-native-session-storage

With Expo CLI:

expo install react-native-session-storage

Usage

Importing

import SessionStorage from 'react-native-session-storage';

Storing data

The value can be of any type.

SessionStorage.setItem('@storage_key', value);

Reading data

The return value is of the type of the value which was stored using setItem(...)

const data = SessionStorage.getItem('@storage_key');

Removing data

SessionStorage.removeItem('@storage_key');

Clearing all keys

SessionStorage.clear();

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 08 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc