All Projects β†’ null-none β†’ react-localstorage

null-none / react-localstorage

Licence: other
Easy methods for use localstorage in Reactjs.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-localstorage

Vue Warehouse
A Cross-browser storage for Vue.js and Nuxt.js, with plugins support and easy extensibility based on Store.js.
Stars: ✭ 161 (+666.67%)
Mutual labels:  localstorage
Awesome Web Storage
😎 Everything you need to know about Client-side Storage.
Stars: ✭ 227 (+980.95%)
Mutual labels:  localstorage
React Native Storage
local storage wrapper for both react-native and browser. Support size controlling, auto expiring, remote data auto syncing and getting batch data in one query.
Stars: ✭ 2,822 (+13338.1%)
Mutual labels:  localstorage
Remotestorage.js
⬑ JavaScript client library for integrating remoteStorage in apps
Stars: ✭ 2,155 (+10161.9%)
Mutual labels:  localstorage
Brownies
🍫 Tastier cookies, local, session, and db storage in a tiny package. Includes subscribe() events for changes.
Stars: ✭ 2,386 (+11261.9%)
Mutual labels:  localstorage
Vuex Along
πŸ“ A plugins to auto save and restore state for vuex
Stars: ✭ 239 (+1038.1%)
Mutual labels:  localstorage
Vue Shop
VUEη§»εŠ¨ε°ε•†εŸŽ
Stars: ✭ 148 (+604.76%)
Mutual labels:  localstorage
Vellum
Vellum is local persistent data storage for iOS
Stars: ✭ 16 (-23.81%)
Mutual labels:  localstorage
Angular Cached Resource
An AngularJS module to interact with RESTful resources, even when browser is offline
Stars: ✭ 218 (+938.1%)
Mutual labels:  localstorage
Depot.js
πŸ“¦ depot.js is a storage library with a simple API
Stars: ✭ 247 (+1076.19%)
Mutual labels:  localstorage
Timelite
Why is it 5 AM? Isn't there something simple I can use to track what I'm doing with all this time?
Stars: ✭ 201 (+857.14%)
Mutual labels:  localstorage
Flutter localstorage
πŸ“¦flutter localstorage for ios/android/desktop/web
Stars: ✭ 206 (+880.95%)
Mutual labels:  localstorage
Vue Save State
A Vue mixin to save the state of a component to local storage
Stars: ✭ 243 (+1057.14%)
Mutual labels:  localstorage
React Local Storage
Showcase on how to use the native localStorage of the browser in React.
Stars: ✭ 168 (+700%)
Mutual labels:  localstorage
Lowdb
Simple to use local JSON database (supports Node, Electron and the browser)
Stars: ✭ 16,886 (+80309.52%)
Mutual labels:  localstorage
Ngx Store
Angular decorators to automagically keep variables in HTML5 LocalStorage, SessionStorage, cookies; injectable services for managing and listening to data changes and a bit more.
Stars: ✭ 152 (+623.81%)
Mutual labels:  localstorage
Canvas Sketch
App to sketch out a business model canvas
Stars: ✭ 232 (+1004.76%)
Mutual labels:  localstorage
cache-bucket
Light Cache for nodeJs and browserJs with TTL.
Stars: ✭ 14 (-33.33%)
Mutual labels:  localstorage
mst-persist
Persist and hydrate MobX-state-tree stores (in < 100 LoC)
Stars: ✭ 75 (+257.14%)
Mutual labels:  localstorage
Jest Localstorage Mock
A module to mock window.localStorage and window.sessionStorage in Jest
Stars: ✭ 247 (+1076.19%)
Mutual labels:  localstorage

reactLocalStorage

Easy use localstorage in Reactjs

https://www.npmjs.com/package/reactjs-localstorage

Installation

npm install reactjs-localstorage

or

yarn add reactjs-localstorage

Examples

import {reactLocalStorage} from 'reactjs-localstorage';

reactLocalStorage.set('var', true);
reactLocalStorage.get('var', true);
reactLocalStorage.setObject('var', {'test': 'test'});
reactLocalStorage.getObject('var');
reactLocalStorage.remove('var');
reactLocalStorage.clear();

Test

npm run test

API Guide

  • reactLocalStorage.set(key, value)
  • reactLocalStorage.get(key, deafultValue=undefined, silent=true)
  • reactLocalStorage.setObject(key, object)
  • reactLocalStorage.getObject(key, defaultValue={}, silent=true)
  • reactLocalStorage.remove(key)
  • reactLocalStorage.clear()

silent:

  • true: Will not throw exception instead will return defaultValue
  • false: Will throw exception

License

MIT

Donation Button

Donate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].