ml
mobx-localstorage
npm i mobx-localstorage
ml

mobx-localstorage

A declarative reactive localStorage using MobX

by Aihorn Mac

1.2.0 (see all)License:MITTypeScript:Built-In
npm i mobx-localstorage
Readme

mobx-localstorage

A declarative reactive localStorage using MobX

Install

yarn add mobx-localstorage
npm i -S mobx-localstorage

Features

  • Higher performance than native getter
  • Synchronize with external changes
  • Support native APIs and MobX APIs

Usage

Same as native but can be observed by MobX

import { autorun } from 'mobx';
import localStorage from 'mobx-localstorage';

autorun(() => {
  console.log(localStorage.getItem('foo'));
});

localStorage.setItem('foo', 'bar');

// print bar
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate